flake warnings (#304)

This commit is contained in:
Bruno Cabral
2022-12-12 02:44:27 -08:00
committed by GitHub
parent f10a3f1d1a
commit fb4109bd77
67 changed files with 252 additions and 248 deletions

View File

@@ -69,7 +69,7 @@ class SuggestionsManager:
try:
sugs_timestamp = datetime.fromtimestamp(float(timestamp_str))
except:
except Exception:
self.logger.error(f"Could not parse the cached suggestions file timestamp: {timestamp_str}")
return True
@@ -105,7 +105,7 @@ class SuggestionsManager:
try:
return yaml.safe_load(sugs_str)
except:
except Exception:
self.logger.error("An unexpected exception happened")
traceback.print_exc()
return {}
@@ -147,7 +147,7 @@ class SuggestionsManager:
try:
with open(self._cached_file_path, 'w+') as f:
f.write(yaml.safe_dump(suggestions))
except:
except Exception:
self.logger.error(f"Could write to {self._cached_file_path}")
traceback.print_exc()
return
@@ -157,7 +157,7 @@ class SuggestionsManager:
try:
with open(self._cached_file_ts_path, 'w+') as f:
f.write(str(timestamp))
except:
except Exception:
self.logger.error(f"Could not write to {self._cached_file_ts_path}")
traceback.print_exc()
return