From 55b8e895db15aa14e88251f122269086db0053ff Mon Sep 17 00:00:00 2001 From: Jay MOULIN Date: Sat, 7 Jul 2018 17:21:45 +0200 Subject: [PATCH] do not crash when 401 due to already signed if error --- uploader/google_music_manager_uploader/uploader_daemon.py | 5 +---- uploader/setup.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/uploader/google_music_manager_uploader/uploader_daemon.py b/uploader/google_music_manager_uploader/uploader_daemon.py index ccca88a..a21808b 100755 --- a/uploader/google_music_manager_uploader/uploader_daemon.py +++ b/uploader/google_music_manager_uploader/uploader_daemon.py @@ -37,11 +37,8 @@ def upload_file(api, file_path, logger, oauth=os.environ['HOME'] + '/oauth', upl retry = 0 except CallFailure as e: error_message = str(e) + retry -= 1 if "401" in error_message: - retry -= 1 - if not api.login(oauth, uploader_id): - print("Error with oauth credentials") - sys.exit(1) elif "502" in error_message: retry -= 1 time.sleep(30) diff --git a/uploader/setup.py b/uploader/setup.py index 47f013e..61e446e 100644 --- a/uploader/setup.py +++ b/uploader/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages -__version__ = '1.2.1' +__version__ = '1.2.2' setup( name='google_music_manager_uploader',