for f in fmts:
try:
# return timestamp normalized to UTC, rendered as DATEFMT.
- return datetime.datetime.strptime(s, f).astimezone(tz=datetime.timezone.utc).strftime(DATEFMT)
+ return (
+ datetime.datetime.strptime(s, f)
+ .astimezone(tz=datetime.timezone.utc)
+ .strftime(DATEFMT)
+ )
except ValueError:
pass
return None
if os.path.exists(config_file):
config = read_config(config_file)
- if config.has_section('global') and config.has_option('global', 'fsid'):
+ if config.has_section('global') and config.has_option(
+ 'global', 'fsid'
+ ):
return config.get('global', 'fsid')
return None