mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Don't allow failure for invalid python3 code + fix unsued variables
This commit is contained in:
parent
58522d4105
commit
de126fcdce
5 changed files with 4 additions and 5 deletions
|
@ -14,7 +14,6 @@ lint37:
|
|||
invalidcode37:
|
||||
stage: lint
|
||||
image: "before-install"
|
||||
allow_failure: true
|
||||
needs: []
|
||||
script:
|
||||
- tox -e py37-invalidcode
|
||||
|
|
|
@ -831,7 +831,7 @@ def app_install(operation_logger, app, label=None, args=None, no_remove_on_failu
|
|||
logger.error(m18n.n("app_install_failed", app=app_id, error=error))
|
||||
failure_message_with_debug_instructions = operation_logger.error(error)
|
||||
# Something wrong happened in Yunohost's code (most probably hook_exec)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
import traceback
|
||||
error = m18n.n('unexpected_error', error="\n" + traceback.format_exc())
|
||||
logger.error(m18n.n("app_install_failed", app=app_id, error=error))
|
||||
|
|
|
@ -1644,7 +1644,7 @@ class BackupMethod(object):
|
|||
try:
|
||||
subprocess.check_call(["mount", "--rbind", src, dest])
|
||||
subprocess.check_call(["mount", "-o", "remount,ro,bind", dest])
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
logger.warning(m18n.n("backup_couldnt_bind", src=src, dest=dest))
|
||||
# To check if dest is mounted, use /proc/mounts that
|
||||
# escape spaces as \040
|
||||
|
|
|
@ -98,7 +98,7 @@ class MyMigration(Migration):
|
|||
# Migrate old settings
|
||||
migrate_legacy_permission_settings()
|
||||
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
logger.warn(m18n.n("migration_0019_migration_failed_trying_to_rollback"))
|
||||
os.system("systemctl stop slapd")
|
||||
os.system("rm -r /etc/ldap/slapd.d") # To be sure that we don't keep some part of the old config
|
||||
|
|
|
@ -22,7 +22,7 @@ class SetupGroupPermissions():
|
|||
try:
|
||||
objects = ldap.search(target + ",dc=yunohost,dc=org")
|
||||
# ldap search will raise an exception if no corresponding object is found >.> ...
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
logger.debug("%s does not exist, no need to delete it" % target)
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue