* stupid check fails if --component passes with empty package list. This can be

seen with the usage of -Dtmp and before adding any repo to -Dtmp. 

  May also happen with a really empty component.
This commit is contained in:
Faik Uygur
2006-11-09 13:45:34 +00:00
parent aaed37b720
commit cc181798fa
+1 -1
View File
@@ -84,7 +84,7 @@ def install(packages, reinstall = False, ignore_file_conflicts=False):
from pisi.atomicoperations import Error as InstallError
# determine if this is a list of files/urls or names
if packages[0].endswith(ctx.const.package_suffix): # they all have to!
if packages and packages[0].endswith(ctx.const.package_suffix): # they all have to!
return install_pkg_files(packages)
else:
return install_pkg_names(packages, reinstall)