mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Merge pull request #178 from airwoodix/fix-coding-style-ci-build
Fix coding style
This commit is contained in:
commit
34878c2610
6 changed files with 6 additions and 10 deletions
|
@ -103,6 +103,7 @@ class CommentParameter(_ExtraParameter):
|
||||||
% value)
|
% value)
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
||||||
class AskParameter(_ExtraParameter):
|
class AskParameter(_ExtraParameter):
|
||||||
"""
|
"""
|
||||||
Ask for the argument value if possible and needed.
|
Ask for the argument value if possible and needed.
|
||||||
|
@ -229,6 +230,7 @@ class RequiredParameter(_ExtraParameter):
|
||||||
% value)
|
% value)
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
The list of available extra parameters classes. It will keep to this list
|
The list of available extra parameters classes. It will keep to this list
|
||||||
order on argument parsing.
|
order on argument parsing.
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import os
|
|
||||||
import errno
|
import errno
|
||||||
import logging
|
import logging
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import os
|
|
||||||
import re
|
import re
|
||||||
import errno
|
import errno
|
||||||
import logging
|
import logging
|
||||||
|
|
|
@ -7,7 +7,6 @@ import grp
|
||||||
from pwd import getpwnam
|
from pwd import getpwnam
|
||||||
|
|
||||||
from moulinette import m18n
|
from moulinette import m18n
|
||||||
from moulinette.globals import CACHE_DIR
|
|
||||||
from moulinette.core import MoulinetteError
|
from moulinette.core import MoulinetteError
|
||||||
|
|
||||||
# Files & directories --------------------------------------------------
|
# Files & directories --------------------------------------------------
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
# import all constant because other modules tries to important them from this
|
# import all constants because other modules try to import them from this
|
||||||
# module because SUCCESS is defined in this module
|
# module because SUCCESS is defined in this module
|
||||||
from logging import (addLevelName, setLoggerClass, Logger, getLogger, NOTSET,
|
from logging import (addLevelName, setLoggerClass, Logger, getLogger, NOTSET,
|
||||||
DEBUG, INFO, WARNING, ERROR, CRITICAL)
|
DEBUG, INFO, WARNING, ERROR, CRITICAL)
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
import errno
|
|
||||||
import time
|
import time
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from moulinette.core import MoulinetteError
|
|
||||||
|
|
||||||
# This import is unused in this file. It will be deleted in future (W0611 PEP8),
|
# This import is unused in this file. It will be deleted in future (W0611 PEP8),
|
||||||
# but for the momment we keep it due to yunohost moulinette script that used
|
# but for the momment we keep it due to yunohost moulinette script that used
|
||||||
# process.quote syntax to access this module !
|
# process.quote syntax to access this module !
|
||||||
|
@ -60,13 +57,13 @@ def call_async_output(args, callback, **kwargs):
|
||||||
raise ValueError('%s argument not allowed, '
|
raise ValueError('%s argument not allowed, '
|
||||||
'it will be overridden.' % a)
|
'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
|
assert len(callback) == 3
|
||||||
stdinfo = kwargs.pop("stdinfo")
|
stdinfo = kwargs.pop("stdinfo")
|
||||||
os.mkfifo(stdinfo, 0600)
|
os.mkfifo(stdinfo, 0600)
|
||||||
# Open stdinfo for reading (in a nonblocking way, i.e. even
|
# Open stdinfo for reading (in a nonblocking way, i.e. even
|
||||||
# if command does not write in the stdinfo pipe...)
|
# 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:
|
else:
|
||||||
kwargs.pop("stdinfo")
|
kwargs.pop("stdinfo")
|
||||||
stdinfo = None
|
stdinfo = None
|
||||||
|
|
Loading…
Reference in a new issue