mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-12 13:18:28 +03:00
Implementing ruff suggestions.
This commit is contained in:
@@ -21,7 +21,7 @@ def expand_url(url):
|
||||
r = requests.get(url)
|
||||
logger.debug(f"Expanded url {url} to {r.url}")
|
||||
return r.url
|
||||
except:
|
||||
except Exception:
|
||||
logger.error(f"Failed to expand url {url}")
|
||||
return url
|
||||
|
||||
@@ -32,7 +32,7 @@ def getattr_or(o: object, prop: str, default=None):
|
||||
if res is None:
|
||||
raise
|
||||
return res
|
||||
except:
|
||||
except Exception:
|
||||
return default
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user