]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: re-format black data_utils.py
authorAdam King <adking@redhat.com>
Sat, 23 Sep 2023 16:16:06 +0000 (12:16 -0400)
committerAdam King <adking@redhat.com>
Sat, 30 Sep 2023 19:28:44 +0000 (15:28 -0400)
Signed-off-by: Adam King <adking@redhat.com>
src/cephadm/cephadmlib/data_utils.py

index 21fceb54ccfe1f22827969ac798fef9f747ec56e..9493a37d00f26ef4897f8e570a7969e29fd37dcb 100644 (file)
@@ -138,7 +138,11 @@ def try_convert_datetime(s):
     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
@@ -188,6 +192,8 @@ def get_legacy_config_fsid(cluster, legacy_dir=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