Skip to content

Commit

Permalink
Fix bot crashing while cloning, compressing or extracting data
Browse files Browse the repository at this point in the history
  • Loading branch information
l3v11 authored Oct 31, 2022
1 parent ed41877 commit c41fefa
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

DATABASE_URL = os.environ.get('DATABASE_URL', '')
if len(DATABASE_URL) == 0:
DATABASE_URL = ''
DATABASE_URL = None

IS_TEAM_DRIVE = os.environ.get('IS_TEAM_DRIVE', '')
IS_TEAM_DRIVE = IS_TEAM_DRIVE.lower() == 'true'
Expand All @@ -102,13 +102,13 @@

INDEX_URL = os.environ.get('INDEX_URL', '').rstrip("/")
if len(INDEX_URL) == 0:
INDEX_URL = ''
INDEX_URL = None

ARCHIVE_LIMIT = os.environ.get('ARCHIVE_LIMIT', '')
ARCHIVE_LIMIT = '' if len(ARCHIVE_LIMIT) == 0 else float(ARCHIVE_LIMIT)
ARCHIVE_LIMIT = None if len(ARCHIVE_LIMIT) == 0 else float(ARCHIVE_LIMIT)

CLONE_LIMIT = os.environ.get('CLONE_LIMIT', '')
CLONE_LIMIT = '' if len(CLONE_LIMIT) == 0 else float(CLONE_LIMIT)
CLONE_LIMIT = None if len(CLONE_LIMIT) == 0 else float(CLONE_LIMIT)

TOKEN_JSON_URL = os.environ.get('TOKEN_JSON_URL', '')
if len(TOKEN_JSON_URL) != 0:
Expand Down Expand Up @@ -152,12 +152,12 @@
APPDRIVE_EMAIL = os.environ.get('APPDRIVE_EMAIL', '')
APPDRIVE_PASS = os.environ.get('APPDRIVE_PASS', '')
if len(APPDRIVE_EMAIL) == 0 or len(APPDRIVE_PASS) == 0:
APPDRIVE_EMAIL = ''
APPDRIVE_PASS = ''
APPDRIVE_EMAIL = None
APPDRIVE_PASS = None

GDTOT_CRYPT = os.environ.get('GDTOT_CRYPT', '')
if len(GDTOT_CRYPT) == 0:
GDTOT_CRYPT = ''
GDTOT_CRYPT = None

if os.path.exists('drive_list'):
with open('drive_list', 'r+') as f:
Expand Down

0 comments on commit c41fefa

Please sign in to comment.