diff options
author | Rob Austein <sra@hactrn.net> | 2007-12-03 22:06:38 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-12-03 22:06:38 +0000 |
commit | 02170c43449a92b0591ab7c6d91f10054449c753 (patch) | |
tree | c85ee2fa3b8874867daab904184c81a4a7389628 /scripts/rpki/left_right.py | |
parent | c2bc38564ce8a7fd0761ba5d627db671c927d335 (diff) |
Cleaner handling of unimplemented controls.
svn path=/scripts/rpki/left_right.py; revision=1348
Diffstat (limited to 'scripts/rpki/left_right.py')
-rw-r--r-- | scripts/rpki/left_right.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/rpki/left_right.py b/scripts/rpki/left_right.py index a25c0c71..73e4222a 100644 --- a/scripts/rpki/left_right.py +++ b/scripts/rpki/left_right.py @@ -157,9 +157,9 @@ class data_elt(base_elt, rpki.sql.sql_persistant): def unimplemented_control(self, *controls): """Uniform handling for unimplemented control operations.""" - if reduce(lambda x,y: x or getattr(self, y), controls, False): - raise rpki.exceptions.NotImplementedYet, "Unimplemented control %s" % ", ".join( - b for b in controls if getattr(self, b)) + unimplemented = [x for x in controls if getattr(self, x, False)] + if unimplemented: + raise rpki.exceptions.NotImplementedYet, "Unimplemented control %s" % ", ".join(unimplemented) class extension_preference_elt(base_elt): """Container for extension preferences.""" |