Adjust coding style to make CI build pass.

Coding style checker: pep8 --ignore E501,E128,E731 <...>
This commit is contained in:
airwoodix 2018-11-22 22:46:42 +01:00
parent c2f02cd14b
commit 086d176c28
2 changed files with 4 additions and 3 deletions

View file

@ -103,6 +103,7 @@ class CommentParameter(_ExtraParameter):
% value)
return value
class AskParameter(_ExtraParameter):
"""
Ask for the argument value if possible and needed.
@ -234,7 +235,7 @@ The list of available extra parameters classes. It will keep to this list
order on argument parsing.
"""
extraparameters_list = [CommentParameter, AskParameter, PasswordParameter,
extraparameters_list = [CommentParameter, AskParameter, PasswordParameter,
RequiredParameter, PatternParameter]
# Extra parameters argument Parser

View file

@ -60,13 +60,13 @@ def call_async_output(args, callback, **kwargs):
raise ValueError('%s argument not allowed, '
'it will be overridden.' % a)
if "stdinfo" in kwargs and kwargs["stdinfo"] != None:
if "stdinfo" in kwargs and kwargs["stdinfo"] is not None:
assert len(callback) == 3
stdinfo = kwargs.pop("stdinfo")
os.mkfifo(stdinfo, 0600)
# Open stdinfo for reading (in a nonblocking way, i.e. even
# if command does not write in the stdinfo pipe...)
stdinfo_f = os.open(stdinfo, os.O_RDONLY|os.O_NONBLOCK)
stdinfo_f = os.open(stdinfo, os.O_RDONLY | os.O_NONBLOCK)
else:
kwargs.pop("stdinfo")
stdinfo = None