we have a constant, use it..

This commit is contained in:
Barış Metin
2005-11-22 19:27:09 +00:00
parent ce9fd3073e
commit 822ef0b0ca
+2 -2
View File
@@ -48,7 +48,7 @@ def install(packages):
from pisi.atomicoperations import Error as InstallError from pisi.atomicoperations import Error as InstallError
# determine if this is a list of files/urls or names # determine if this is a list of files/urls or names
if packages[0].endswith('.pisi'): # they all have to! if packages[0].endswith(ctx.const.package_suffix): # they all have to!
return install_pkg_files(packages) return install_pkg_files(packages)
else: else:
return install_pkg_names(packages) return install_pkg_names(packages)
@@ -257,7 +257,7 @@ def upgrade_pkg_names(A = []):
A_0 = A = expand_components(set(A)) A_0 = A = expand_components(set(A))
Ap = [] Ap = []
for x in A: for x in A:
if x.endswith('.pisi'): if x.endswith(ctx.const.package_suffix):
ctx.ui.debug(_("Warning: package *name* ends with '.pisi'")) ctx.ui.debug(_("Warning: package *name* ends with '.pisi'"))
if not ctx.installdb.is_installed(x): if not ctx.installdb.is_installed(x):
ctx.ui.info(_('Package %s is not installed.') % x) ctx.ui.info(_('Package %s is not installed.') % x)