Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
do not crash when 401 due to already signed if error
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymoulin committed Jul 7, 2018
1 parent 8f39a67 commit 55b8e89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions uploader/google_music_manager_uploader/uploader_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:

This comment has been minimized.

Copy link
@frohoff

frohoff Jul 9, 2018

Perhaps this 401 conditional should be removed? Currently seems to cause this:

raceback (most recent call last):
  File "/usr/local/bin/google-music-upload", line 7, in <module>
    from google_music_manager_uploader.uploader_daemon import main
  File "/usr/local/lib/python3.6/site-packages/google_music_manager_uploader/__init__.py", line 5, in <module>
    from .uploader_daemon import upload
  File "/usr/local/lib/python3.6/site-packages/google_music_manager_uploader/uploader_daemon.py", line 42
    elif "502" in error_message:
       ^
IndentationError: expected an indented block

This comment has been minimized.

Copy link
@jaymoulin

jaymoulin Jul 9, 2018

Author Owner

This condition is necessary - related to #11 . Should be fixed with 1.2.3

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)
Expand Down
2 changes: 1 addition & 1 deletion uploader/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from setuptools import setup, find_packages

__version__ = '1.2.1'
__version__ = '1.2.2'

setup(
name='google_music_manager_uploader',
Expand Down

0 comments on commit 55b8e89

Please sign in to comment.