mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
flake warnings (#304)
This commit is contained in:
@@ -85,7 +85,7 @@ class CategoriesDownloader(Thread):
|
||||
f.write(str(timestamp))
|
||||
|
||||
self.logger.info(self._msg("Categories timestamp ({}) cached to file '{}'".format(timestamp, categories_ts_path)))
|
||||
except:
|
||||
except Exception:
|
||||
self.logger.error(self._msg("Could not cache categories to the disk as '{}'".format(self.categories_path)))
|
||||
traceback.print_exc()
|
||||
|
||||
@@ -106,7 +106,7 @@ class CategoriesDownloader(Thread):
|
||||
try:
|
||||
categories = self._map_categories(res.text)
|
||||
self.logger.info(self._msg('Loaded categories for {} applications'.format(len(categories))))
|
||||
except:
|
||||
except Exception:
|
||||
self.logger.error(self._msg("Could not parse categories definitions"))
|
||||
traceback.print_exc()
|
||||
return {}
|
||||
@@ -140,7 +140,7 @@ class CategoriesDownloader(Thread):
|
||||
|
||||
try:
|
||||
categories_timestamp = datetime.fromtimestamp(float(timestamp_str))
|
||||
except:
|
||||
except Exception:
|
||||
self.logger.error(self._msg("An exception occurred when trying to parse the categories file timestamp from '{}'. The categories file should be re-downloaded.".format(categories_ts_path)))
|
||||
traceback.print_exc()
|
||||
return True
|
||||
|
||||
@@ -98,5 +98,5 @@ class YAMLConfigManager(ConfigManager, ABC):
|
||||
try:
|
||||
with open(self.file_path, 'w+') as f:
|
||||
f.write(yaml.dump(config_obj))
|
||||
except:
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
|
||||
@@ -13,6 +13,5 @@ class InternetChecker:
|
||||
try:
|
||||
socket.gethostbyname('google.com')
|
||||
return True
|
||||
except:
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user