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:
|
invalidcode37:
|
||||||
stage: lint
|
stage: lint
|
||||||
image: "before-install"
|
image: "before-install"
|
||||||
allow_failure: true
|
|
||||||
needs: []
|
needs: []
|
||||||
script:
|
script:
|
||||||
- tox -e py37-invalidcode
|
- 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))
|
logger.error(m18n.n("app_install_failed", app=app_id, error=error))
|
||||||
failure_message_with_debug_instructions = operation_logger.error(error)
|
failure_message_with_debug_instructions = operation_logger.error(error)
|
||||||
# Something wrong happened in Yunohost's code (most probably hook_exec)
|
# Something wrong happened in Yunohost's code (most probably hook_exec)
|
||||||
except Exception as e:
|
except Exception:
|
||||||
import traceback
|
import traceback
|
||||||
error = m18n.n('unexpected_error', error="\n" + traceback.format_exc())
|
error = m18n.n('unexpected_error', error="\n" + traceback.format_exc())
|
||||||
logger.error(m18n.n("app_install_failed", app=app_id, error=error))
|
logger.error(m18n.n("app_install_failed", app=app_id, error=error))
|
||||||
|
|
|
@ -1644,7 +1644,7 @@ class BackupMethod(object):
|
||||||
try:
|
try:
|
||||||
subprocess.check_call(["mount", "--rbind", src, dest])
|
subprocess.check_call(["mount", "--rbind", src, dest])
|
||||||
subprocess.check_call(["mount", "-o", "remount,ro,bind", 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))
|
logger.warning(m18n.n("backup_couldnt_bind", src=src, dest=dest))
|
||||||
# To check if dest is mounted, use /proc/mounts that
|
# To check if dest is mounted, use /proc/mounts that
|
||||||
# escape spaces as \040
|
# escape spaces as \040
|
||||||
|
|
|
@ -98,7 +98,7 @@ class MyMigration(Migration):
|
||||||
# Migrate old settings
|
# Migrate old settings
|
||||||
migrate_legacy_permission_settings()
|
migrate_legacy_permission_settings()
|
||||||
|
|
||||||
except Exception as e:
|
except Exception:
|
||||||
logger.warn(m18n.n("migration_0019_migration_failed_trying_to_rollback"))
|
logger.warn(m18n.n("migration_0019_migration_failed_trying_to_rollback"))
|
||||||
os.system("systemctl stop slapd")
|
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
|
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:
|
try:
|
||||||
objects = ldap.search(target + ",dc=yunohost,dc=org")
|
objects = ldap.search(target + ",dc=yunohost,dc=org")
|
||||||
# ldap search will raise an exception if no corresponding object is found >.> ...
|
# 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)
|
logger.debug("%s does not exist, no need to delete it" % target)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue