mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[mod] pep8 on app.py
This commit is contained in:
parent
40a5bcc96b
commit
8117ffb85f
2 changed files with 6 additions and 8 deletions
|
@ -1544,7 +1544,7 @@ def _fetch_app_from_git(app):
|
||||||
else:
|
else:
|
||||||
raise MoulinetteError(errno.EINVAL, m18n.n('app_unknown'))
|
raise MoulinetteError(errno.EINVAL, m18n.n('app_unknown'))
|
||||||
|
|
||||||
if not 'git' in app_info:
|
if 'git' not in app_info:
|
||||||
raise MoulinetteError(errno.EINVAL,
|
raise MoulinetteError(errno.EINVAL,
|
||||||
m18n.n('app_unsupported_remote_type'))
|
m18n.n('app_unsupported_remote_type'))
|
||||||
url = app_info['git']['url']
|
url = app_info['git']['url']
|
||||||
|
@ -1852,9 +1852,9 @@ def _parse_args_from_manifest(manifest, action, args={}, auth=None):
|
||||||
# is an available url and normalize the path.
|
# is an available url and normalize the path.
|
||||||
|
|
||||||
domain_args = [arg["name"] for arg in action_args
|
domain_args = [arg["name"] for arg in action_args
|
||||||
if arg.get("type","string") == "domain"]
|
if arg.get("type", "string") == "domain"]
|
||||||
path_args = [arg["name"] for arg in action_args
|
path_args = [arg["name"] for arg in action_args
|
||||||
if arg.get("type","string") == "path"]
|
if arg.get("type", "string") == "path"]
|
||||||
|
|
||||||
if len(domain_args) == 1 and len(path_args) == 1:
|
if len(domain_args) == 1 and len(path_args) == 1:
|
||||||
|
|
||||||
|
@ -1871,7 +1871,6 @@ def _parse_args_from_manifest(manifest, action, args={}, auth=None):
|
||||||
# standard path format to deal with no matter what the user inputted)
|
# standard path format to deal with no matter what the user inputted)
|
||||||
args_dict[path_args[0]] = path
|
args_dict[path_args[0]] = path
|
||||||
|
|
||||||
|
|
||||||
return args_dict
|
return args_dict
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1456,8 +1456,7 @@ class BackupMethod(object):
|
||||||
|
|
||||||
points_to_umount = [line.split(" ")[2]
|
points_to_umount = [line.split(" ")[2]
|
||||||
for line in mount_lines
|
for line in mount_lines
|
||||||
if len(line) >= 3
|
if len(line) >= 3 and line.split(" ")[2].startswith(directory)]
|
||||||
and line.split(" ")[2].startswith(directory)]
|
|
||||||
ret = 0
|
ret = 0
|
||||||
for point in reversed(points_to_umount):
|
for point in reversed(points_to_umount):
|
||||||
ret = subprocess.call(["umount", point])
|
ret = subprocess.call(["umount", point])
|
||||||
|
@ -1945,7 +1944,7 @@ def backup_create(name=None, description=None, methods=[],
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
# Historical, deprecated options
|
# Historical, deprecated options
|
||||||
if ignore_hooks != False:
|
if ignore_hooks is not False:
|
||||||
logger.warning("--ignore-hooks is deprecated and will be removed in the"
|
logger.warning("--ignore-hooks is deprecated and will be removed in the"
|
||||||
"future. Please use --ignore-system instead.")
|
"future. Please use --ignore-system instead.")
|
||||||
ignore_system = ignore_hooks
|
ignore_system = ignore_hooks
|
||||||
|
@ -2073,7 +2072,7 @@ def backup_restore(auth, name,
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
# Historical, deprecated options
|
# Historical, deprecated options
|
||||||
if ignore_hooks != False:
|
if ignore_hooks is not False:
|
||||||
logger.warning("--ignore-hooks is deprecated and will be removed in the"
|
logger.warning("--ignore-hooks is deprecated and will be removed in the"
|
||||||
"future. Please use --ignore-system instead.")
|
"future. Please use --ignore-system instead.")
|
||||||
ignore_system = ignore_hooks
|
ignore_system = ignore_hooks
|
||||||
|
|
Loading…
Add table
Reference in a new issue