mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[mod] please flake8 by respecting pep8 and removing except:
This commit is contained in:
parent
0267a798a7
commit
169ae96f0a
1 changed files with 8 additions and 7 deletions
|
@ -734,8 +734,8 @@ def app_install(operation_logger, auth, app, label=None, args=None, no_remove_on
|
|||
if answer.upper() != "Y":
|
||||
raise YunohostError("aborting")
|
||||
|
||||
|
||||
raw_app_list = app_list(raw=True)
|
||||
|
||||
if app in raw_app_list or ('@' in app) or ('http://' in app) or ('https://' in app):
|
||||
if app in raw_app_list:
|
||||
state = raw_app_list[app].get("state", "notworking")
|
||||
|
@ -1209,8 +1209,8 @@ def app_setting(app, key, value=None, delete=False):
|
|||
if value is None and not delete:
|
||||
try:
|
||||
return app_settings[key]
|
||||
except:
|
||||
logger.debug("cannot get app setting '%s' for '%s'", key, app)
|
||||
except Exception as e:
|
||||
logger.debug("cannot get app setting '%s' for '%s' (%s)", key, app, e)
|
||||
return None
|
||||
else:
|
||||
if delete and key in app_settings:
|
||||
|
@ -1394,7 +1394,8 @@ def app_ssowatconf(auth):
|
|||
|
||||
try:
|
||||
apps_list = app_list(installed=True)['apps']
|
||||
except:
|
||||
except Exception as e:
|
||||
logger.debug("cannot get installed app list because %s", e)
|
||||
apps_list = []
|
||||
|
||||
def _get_setting(settings, name):
|
||||
|
@ -1907,7 +1908,7 @@ def _fetch_app_from_git(app):
|
|||
# we will be able to use it. Without this option all the history
|
||||
# of the submodules repo is downloaded.
|
||||
subprocess.check_call([
|
||||
'git', 'clone', '-b', branch, '--single-branch', '--recursive', '--depth=1', url,
|
||||
'git', 'clone', '-b', branch, '--single-branch', '--recursive', '--depth=1', url,
|
||||
extracted_app_folder])
|
||||
subprocess.check_call([
|
||||
'git', 'reset', '--hard', branch
|
||||
|
@ -1925,8 +1926,8 @@ def _fetch_app_from_git(app):
|
|||
manifest['remote'] = {'type': 'git', 'url': url, 'branch': branch}
|
||||
try:
|
||||
revision = _get_git_last_commit_hash(url, branch)
|
||||
except:
|
||||
pass
|
||||
except Exception as e:
|
||||
logger.debug("cannot get last commit hash because: %s ", e)
|
||||
else:
|
||||
manifest['remote']['revision'] = revision
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue