Locally scoped ivars in _check_preferences don't need private namespace.

testing/mmn/mktime_takes_localtime_not_gmtime
Isis Lovecruft 2013-05-17 01:02:27 +00:00
parent 615e2cfa60
commit b84268fecd
No known key found for this signature in database
GPG Key ID: A3ADB67A2CDB8B35
1 changed files with 5 additions and 5 deletions

View File

@ -140,7 +140,7 @@ def _is_allowed(input):
if no errors occur. if no errors occur.
""" """
_all = (""" three_hundred_eighteen = ("""
--allow-freeform-uid --multifile --allow-freeform-uid --multifile
--allow-multiple-messages --no --allow-multiple-messages --no
--allow-multisig-verification --no-allow-freeform-uid --allow-multisig-verification --no-allow-freeform-uid
@ -302,7 +302,7 @@ def _is_allowed(input):
--min-cert-level --yes --min-cert-level --yes
""").split() """).split()
_possible = frozenset(_all) possible = frozenset(three_hundred_eighteen)
## these are the allowed options we will handle so far, all others should ## these are the allowed options we will handle so far, all others should
## be dropped. this dance is so that when new options are added later, we ## be dropped. this dance is so that when new options are added later, we
@ -342,9 +342,9 @@ def _is_allowed(input):
## check that _allowed is a subset of _possible ## check that _allowed is a subset of _possible
try: try:
assert _allowed.issubset(_possible), \ assert _allowed.issubset(possible), \
'_allowed is not subset of known options, difference: %s' \ 'allowed is not subset of known options, difference: %s' \
% _allowed.difference(_possible) % _allowed.difference(possible)
except AssertionError as ae: except AssertionError as ae:
logger.debug("_is_allowed(): %s" % ae.message) logger.debug("_is_allowed(): %s" % ae.message)
raise UsageError(ae.message) raise UsageError(ae.message)