From cc181798fa3ef70ee072b8ac851bcb4c1927e6b5 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Thu, 9 Nov 2006 13:45:34 +0000 Subject: [PATCH] * 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. --- pisi/operations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pisi/operations.py b/pisi/operations.py index 84a51596..92db0b71 100644 --- a/pisi/operations.py +++ b/pisi/operations.py @@ -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)