mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 08:34:17 +02:00
flake warnings (#304)
This commit is contained in:
@@ -1 +0,0 @@
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ class GenericSoftwareManager(SoftwareManager, SettingsController):
|
||||
try:
|
||||
Popen(['timeshift-launcher'], stderr=STDOUT)
|
||||
return True
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
watcher.show_message(title=self.i18n["error"].capitalize(),
|
||||
body=self.i18n['action.backups.tool_error'].format(bold('Timeshift')),
|
||||
@@ -266,7 +266,7 @@ class GenericSoftwareManager(SoftwareManager, SettingsController):
|
||||
self.logger.info(f'Took {tf - ti:.2f} seconds')
|
||||
return res
|
||||
|
||||
def _add_category(self, pkg: SoftwarePackage, category: str):
|
||||
def _add_category(self, pkg: SoftwarePackage, category: str):
|
||||
if isinstance(pkg.categories, tuple):
|
||||
pkg.categories = tuple((*pkg.categories, category))
|
||||
elif isinstance(pkg.categories, list):
|
||||
@@ -331,7 +331,7 @@ class GenericSoftwareManager(SoftwareManager, SettingsController):
|
||||
disk_loader.join()
|
||||
self._update_post_transaction_status(res)
|
||||
return res
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return TransactionResult(success=False, installed=[], removed=[])
|
||||
finally:
|
||||
@@ -352,7 +352,7 @@ class GenericSoftwareManager(SoftwareManager, SettingsController):
|
||||
disk_loader.join()
|
||||
self._update_post_transaction_status(res)
|
||||
return res
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return TransactionResult(success=False, installed=[], removed=[])
|
||||
finally:
|
||||
@@ -617,7 +617,7 @@ class GenericSoftwareManager(SoftwareManager, SettingsController):
|
||||
try:
|
||||
clean_app_files(managers=self.managers, logs=False)
|
||||
restart_app()
|
||||
except:
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
@@ -114,7 +114,7 @@ class AdaptableFileDownloader(FileDownloader):
|
||||
if size:
|
||||
base_substatus.write(f' ( {size} )')
|
||||
watcher.change_substatus(base_substatus.getvalue())
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def _get_appropriate_threads_number(self, max_threads: int, known_size: int) -> int:
|
||||
@@ -193,7 +193,7 @@ class AdaptableFileDownloader(FileDownloader):
|
||||
watcher.change_substatus(msg.getvalue())
|
||||
|
||||
success, _ = handler.handle_simple(process)
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
self._rm_bad_file(file_name, output_path, final_cwd, handler, root_password)
|
||||
|
||||
|
||||
@@ -587,16 +587,17 @@ class GenericSettingsManager(SettingsController):
|
||||
opts=ops_opts,
|
||||
id_='downgrade')
|
||||
|
||||
mode = new_select(label=self.i18n['core.config.backup.mode'],
|
||||
tip=None,
|
||||
value=core_config['backup']['mode'],
|
||||
opts=[
|
||||
(self.i18n['core.config.backup.mode.incremental'], 'incremental',
|
||||
self.i18n['core.config.backup.mode.incremental.tip']),
|
||||
(self.i18n['core.config.backup.mode.only_one'], 'only_one',
|
||||
self.i18n['core.config.backup.mode.only_one.tip'])
|
||||
],
|
||||
id_='mode')
|
||||
mode = new_select(
|
||||
label=self.i18n['core.config.backup.mode'],
|
||||
tip=None,
|
||||
value=core_config['backup']['mode'],
|
||||
opts=[
|
||||
(self.i18n['core.config.backup.mode.incremental'], 'incremental',
|
||||
self.i18n['core.config.backup.mode.incremental.tip']),
|
||||
(self.i18n['core.config.backup.mode.only_one'], 'only_one',
|
||||
self.i18n['core.config.backup.mode.only_one.tip'])
|
||||
],
|
||||
id_='mode')
|
||||
type_ = new_select(label=self.i18n['type'].capitalize(),
|
||||
tip=None,
|
||||
value=core_config['backup']['type'],
|
||||
|
||||
@@ -42,7 +42,7 @@ def check_for_update(logger: logging.Logger, http_client: HttpClient, i18n: I18n
|
||||
Path(notifications_dir).mkdir(parents=True, exist_ok=True)
|
||||
with open(release_file, 'w+') as f:
|
||||
f.write('')
|
||||
except:
|
||||
except Exception:
|
||||
logger.error("An error occurred while trying to create the update notification file: {}".format(release_file))
|
||||
|
||||
if tray:
|
||||
@@ -55,5 +55,5 @@ def check_for_update(logger: logging.Logger, http_client: HttpClient, i18n: I18n
|
||||
logger.warning("No official release found")
|
||||
else:
|
||||
logger.warning("No releases returned from the GitHub API")
|
||||
except:
|
||||
except Exception:
|
||||
logger.error("An error occurred while trying to retrieve the current releases")
|
||||
|
||||
Reference in New Issue
Block a user