Skip to content

Commit

Permalink
Fix for issue NIT-Hamirpur-NITH#26 plus cosmetic fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
swedishmike committed Oct 19, 2016
1 parent 99ab40a commit 0ffaf5c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions torpinger
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ class TorPinger(object):
print(resp.read())
resp.close()
except OSError as e:
print('Time out',e)
print('Error:', e)
sys.exit(1)

def which_socks(self):
op = subprocess.check_output('netstat -lnt',shell=True).decode()
Expand All @@ -96,8 +97,8 @@ class TorPinger(object):
time.sleep(self.timeout_one_check)
## If we get away from loop due to timeout, then exit
if len(SOCKS) == 0:
print('Sorry dude couldn\'t find any active tor connection in the\
given time, exitting')
print('Sorry dude - couldn\'t find any active Tor connection in the'
' given time, exiting.')
return
## Else we are good to go and have a list of open tor sockets
## Of which we choose the one with highest priority
Expand Down

0 comments on commit 0ffaf5c

Please sign in to comment.