From 29f45d981d9bfa78d386f28c3db10f738514b4b5 Mon Sep 17 00:00:00 2001 From: Paul Varner Date: Fri, 2 Sep 2011 14:31:30 -0500 Subject: [PATCH] Fix Bug 381601 python 3 incompatibility. filter() in python 3 now returns and Iterator which evalutes to True even when the list being iterated is empty. The fix is to use a list comprehension instead of the filter when check boolean status. --- smartliverebuild/cli.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/smartliverebuild/cli.py b/smartliverebuild/cli.py index 4fe066d..5d390f5 100644 --- a/smartliverebuild/cli.py +++ b/smartliverebuild/cli.py @@ -139,7 +139,7 @@ def main(argv): except SLRFailure: return 1 - if not packages and not filter(lambda a: not a.startswith('-'), args): + if not packages and not [a for a in args if not a.startswith('-')]: return 0 if opts.pretend: -- 1.7.6.1