Fix Bug: TypeError: a float is required

Brightcells vor 8 Jahren
Ursprung
Commit
0e9bc9a452
1 geänderte Dateien mit 1 neuen Zeilen und 1 gelöschten Zeilen
  1. 1 1
      main.py

+ 1 - 1
main.py

@@ -116,7 +116,7 @@ def is_file_valid(file_):
116 116
 def get_glob_files(lensman, session):
117 117
     _, thumb = get_session_dir(lensman, session)
118 118
     if not os.path.exists(thumb):
119
-        stamp = session.split('_')[1]
119
+        stamp = float(session.split('_')[1] or 0)
120 120
         ymd = datetime.datetime.fromtimestamp(stamp).strftime('%Y%m%d')
121 121
         thumb = '{}/lost/{}/thumb'.format(ROOT_PATH, ymd)
122 122
     return glob.glob('{}/*'.format(thumb))