Skip to content

Commit

Permalink
Fix gyazo config boolean parser
Browse files Browse the repository at this point in the history
  • Loading branch information
migueldemoura committed Dec 4, 2018
1 parent f964833 commit 6e17246
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/myazo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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
Expand Down

0 comments on commit 6e17246

Please sign in to comment.