Fix ternary
This commit is contained in:
parent
1e70b95548
commit
cdfe3037b8
|
@ -67,9 +67,9 @@ def requires_lexicon(command):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# Verify lexicon argument in execute pass
|
# Verify lexicon argument in execute pass
|
||||||
val = ((hasattr(cmd_args, 'lexicon')
|
val = (getattr(cmd_args, 'lexicon')
|
||||||
and getattr(cmd_args, 'lexicon'))
|
if hasattr(cmd_args, 'lexicon')
|
||||||
or None)
|
else None)
|
||||||
if not val:
|
if not val:
|
||||||
from amanuensis.config import logger
|
from amanuensis.config import logger
|
||||||
logger.error("This command requires specifying a lexicon")
|
logger.error("This command requires specifying a lexicon")
|
||||||
|
@ -107,9 +107,9 @@ def requires_user(command):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# Verify user argument in execute pass
|
# Verify user argument in execute pass
|
||||||
val = ((hasattr(cmd_args, "user")
|
val = (getattr(cmd_args, "user")
|
||||||
and getattr(cmd_args, "user"))
|
if hasattr(cmd_args, "user")
|
||||||
or None)
|
else None)
|
||||||
if not val:
|
if not val:
|
||||||
from amanuensis.config import logger
|
from amanuensis.config import logger
|
||||||
logger.error("This command requires specifying a user")
|
logger.error("This command requires specifying a user")
|
||||||
|
|
Loading…
Reference in New Issue