瀏覽代碼

Use generic exception on cookie expiry date error

notcammy 5 年之前
父節點
當前提交
5868fb3a50
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pyinstalive/auth.py

+ 1 - 1
pyinstalive/auth.py

@@ -111,7 +111,7 @@ def authenticate(username, password, force_use_login_args=False):
                 cookie_expiry = ig_api.cookie_jar.auth_expires
                 logger.info('Cookie file expiry date: {:s}'.format(
                     datetime.datetime.fromtimestamp(cookie_expiry).strftime('%Y-%m-%d at %I:%M:%S %p')))
-            except AttributeError as e:
+            except Exception as e:
                 logger.warn('An error occurred while getting the cookie file expiry date: {:s}'.format(str(e)))
 
         logger.separator()