cli/install: Fix the exception raised when an unknown component name is provided

This commit is contained in:
Fatih Aşıcı
2010-05-18 08:26:33 +00:00
parent 8774eaf162
commit 4b650f2c3d
+1 -1
View File
@@ -102,5 +102,5 @@ expanded to package names.
if ctx.get_option('exclude'):
packages = pisi.blacklist.exclude(packages, ctx.get_option('exclude'))
reinstall = packages[0].endswith(ctx.const.package_suffix)
reinstall = bool(packages) and packages[0].endswith(ctx.const.package_suffix)
pisi.api.install(packages, ctx.get_option('reinstall') or reinstall)