Skip to content

Commit

Permalink
Remove unused python variables
Browse files Browse the repository at this point in the history
  • Loading branch information
tresni committed May 22, 2018
1 parent e935fb1 commit 736c98d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dev/Nagios/thruk.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def getData(key, value):
for v in values:
try:
jsondata = getData(group[:-1], v)
except requests.exceptions.ConnectionError as e:
except requests.exceptions.ConnectionError:
errOut("Unable to connect to %s" % NAGIOS_HOST)
for service in jsondata:
dns_name = service['host_name'].split('.')
Expand Down
4 changes: 2 additions & 2 deletions Web/putio.5m.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ def getdir(pid):
transfers = json.loads(str(r.content,encoding='utf-8'))['transfers']
r = requests.get(BURL+'/account/info?oauth_token='+OAUTH_TOKEN)
info = json.loads(str(r.content,encoding='utf-8'))['info']
except requests.exceptions.ConnectionError as msg:
except requests.exceptions.ConnectionError:
print('Error connecting to put.io | color=red')
sys.exit()
except json.decoder.JSONDecodeError as msg:
except json.decoder.JSONDecodeError:
print('JSON Error: see /tmp/putio.log | color=red')
with open('/tmp/putio.log', 'w') as fh:
fh.write(str(r.content,encoding='utf-8'))
Expand Down

0 comments on commit 736c98d

Please sign in to comment.