diff --git a/src/yunohost/app.py b/src/yunohost/app.py index ca56be232..d6bb5d92f 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -627,7 +627,7 @@ def app_upgrade(app=[], url=None, file=None, force=False, no_safety_backup=False if upgrade_failed or broke_the_system: # display this if there are remaining apps - if apps[number + 1:]: + if apps[number + 1 :]: not_upgraded_apps = apps[number:] logger.error( m18n.n( diff --git a/src/yunohost/data_migrations/0018_xtable_to_nftable.py b/src/yunohost/data_migrations/0018_xtable_to_nftable.py index 374620f2f..ae20354d7 100644 --- a/src/yunohost/data_migrations/0018_xtable_to_nftable.py +++ b/src/yunohost/data_migrations/0018_xtable_to_nftable.py @@ -41,8 +41,8 @@ class MyMigration(Migration): ) # For some reason if we don't do this, iptables-legacy-save is empty ? self.runcmd("iptables-legacy-save > %s" % self.backup_rules_ipv4) assert ( - os.path.exists(self.backup_rules_ipv4) and - os.stat(self.backup_rules_ipv4).st_size > 0 + os.path.exists(self.backup_rules_ipv4) + and os.stat(self.backup_rules_ipv4).st_size > 0 ), "Uhoh backup of legacy ipv4 rules is empty !?" if self.do_ipv6 and not os.path.exists(self.backup_rules_ipv6): self.runcmd( @@ -50,8 +50,8 @@ class MyMigration(Migration): ) # For some reason if we don't do this, iptables-legacy-save is empty ? self.runcmd("ip6tables-legacy-save > %s" % self.backup_rules_ipv6) assert ( - os.path.exists(self.backup_rules_ipv6) and - os.stat(self.backup_rules_ipv6).st_size > 0 + os.path.exists(self.backup_rules_ipv6) + and os.stat(self.backup_rules_ipv6).st_size > 0 ), "Uhoh backup of legacy ipv6 rules is empty !?" # We inject the legacy rules (iptables-legacy) into the new iptable (just "iptables") diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py index 10f385c23..717be4e15 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -148,7 +148,31 @@ class MyMigration(Migration): # Also hopefully by then we'll have manifestv2 (maybe) and will be able to use # the apt resource mecanism to regenerate the *-ynh-deps virtual packages ;) - php73packages_suffixes = ['apcu', 'bcmath', 'bz2', 'dom', 'gmp', 'igbinary', 'imagick', 'imap', 'mbstring', 'memcached', 'mysqli', 'mysqlnd', 'pgsql', 'redis', 'simplexml', 'soap', 'sqlite3', 'ssh2', 'tidy', 'xml', 'xmlrpc', 'xsl', 'zip'] + php73packages_suffixes = [ + "apcu", + "bcmath", + "bz2", + "dom", + "gmp", + "igbinary", + "imagick", + "imap", + "mbstring", + "memcached", + "mysqli", + "mysqlnd", + "pgsql", + "redis", + "simplexml", + "soap", + "sqlite3", + "ssh2", + "tidy", + "xml", + "xmlrpc", + "xsl", + "zip", + ] cmd = f""" apt show '*-ynh-deps' 2>/dev/null @@ -157,10 +181,23 @@ class MyMigration(Migration): | sort | uniq | sed 's/php7.3/php7.4/g' """ - php74packages_to_install = ["php7.4-fpm", "php7.4-common", "php7.4-ldap", "php7.4-intl", "php7.4-mysql", "php7.4-gd", "php7.4-curl", "php-php-gettext"] - php74packages_to_install += [f.strip() for f in check_output(cmd).split("\n") if f.strip()] + php74packages_to_install = [ + "php7.4-fpm", + "php7.4-common", + "php7.4-ldap", + "php7.4-intl", + "php7.4-mysql", + "php7.4-gd", + "php7.4-curl", + "php-php-gettext", + ] + php74packages_to_install += [ + f.strip() for f in check_output(cmd).split("\n") if f.strip() + ] - self.apt_install("{' '.join(php74packages_to_install)} -o Dpkg::Options::='--force-confmiss'") + self.apt_install( + "{' '.join(php74packages_to_install)} -o Dpkg::Options::='--force-confmiss'" + ) # Remove legacy postgresql service record added by helpers, # will now be dynamically handled by the core in bullseye diff --git a/src/yunohost/domain.py b/src/yunohost/domain.py index d1ea45a08..7c512106a 100644 --- a/src/yunohost/domain.py +++ b/src/yunohost/domain.py @@ -517,9 +517,7 @@ def domain_cert_install( ): from yunohost.certificate import certificate_install - return certificate_install( - domain_list, force, no_checks, self_signed, staging - ) + return certificate_install(domain_list, force, no_checks, self_signed, staging) def domain_cert_renew( @@ -527,9 +525,7 @@ def domain_cert_renew( ): from yunohost.certificate import certificate_renew - return certificate_renew( - domain_list, force, no_checks, email, staging - ) + return certificate_renew(domain_list, force, no_checks, email, staging) def domain_dns_conf(domain): diff --git a/src/yunohost/tools.py b/src/yunohost/tools.py index 0ed88d871..c2014b466 100644 --- a/src/yunohost/tools.py +++ b/src/yunohost/tools.py @@ -244,9 +244,7 @@ def tools_postinstall( # and inform the user that we could not contact the dyndns host server. except Exception: logger.warning( - m18n.n( - "dyndns_provider_unreachable", provider="dyndns.yunohost.org" - ) + m18n.n("dyndns_provider_unreachable", provider="dyndns.yunohost.org") ) if available: diff --git a/src/yunohost/user.py b/src/yunohost/user.py index a27fffbee..64249e9d0 100644 --- a/src/yunohost/user.py +++ b/src/yunohost/user.py @@ -1265,9 +1265,7 @@ def user_group_remove(groupname, usernames, force=False, sync_perm=True): def user_permission_list(short=False, full=False, apps=[]): from yunohost.permission import user_permission_list - return user_permission_list( - short, full, absolute_urls=True, apps=apps - ) + return user_permission_list(short, full, absolute_urls=True, apps=apps) def user_permission_update(permission, label=None, show_tile=None, sync_perm=True):