From 6e17246b5a0e36133baf861f61dbc38218c98440 Mon Sep 17 00:00:00 2001 From: Miguel de Moura Date: Sun, 10 Jun 2018 02:15:13 +0100 Subject: [PATCH] Fix gyazo config boolean parser --- client/myazo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/myazo.py b/client/myazo.py index 05f3cd6..21c6e0a 100644 --- a/client/myazo.py +++ b/client/myazo.py @@ -69,7 +69,7 @@ img = open(tmp_file, 'rb') -if config.get('gyazo_server'): +if config.getboolean('gyazo_server'): r = requests.post( 'https://upload.gyazo.com/upload.cgi', files={'imagedata': img} @@ -85,7 +85,7 @@ print('Error: Failed to upload screenshot. Server returned status code {}.'.format(r.status_code)) exit(-2) -if config.get('gyazo_server') and config.get('gyazo_direct_link'): +if config.getboolean('gyazo_server') and config.getboolean('gyazo_direct_link'): # Convert the Gyazo link to a direct image # https://gyazo.com/hash > https://i.gyazo.com/hash.extension url = r.text.replace('//', '//i.') + Path(tmp_file).suffix