Skip to content

Commit

Permalink
fix debug deque problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragon2fly committed Aug 16, 2016
1 parent ae6a63d commit 5f3c59b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions vpnproxy_tui.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
__maintainer__ = "duc_tin"
__email__ = "[email protected]"

import os
import os, sys
import base64
import time
import datetime
Expand All @@ -29,7 +29,7 @@
with open('out.txt', 'w+') as f:
Popen(['python', 'vpn_indicator.py'], stdout=PIPE, stderr=PIPE, bufsize=1, )

args = ['sudo', sys.executable] + sys.argv + [os.environ]
args = ['sudo', '-E', sys.executable] + sys.argv + [os.environ]
os.execlpe('sudo', *args)

# Threading
Expand Down Expand Up @@ -316,14 +316,14 @@ def refresh_data(self, resort_only=''):
sys.exit()

self.sorted[:] = sort
self.messages['debug'].appendleft(' Sequence completed')
if len(sort) == 0:
self.messages['debug'].appendleft(' No thing to do!')
else:
self.messages['debug'].appendleft(' Sequence completed')

def probe(self):
""" Filter out fetched dead Vpn Servers
"""
if len(self.vpndict) == 0:
self.messages['debug'].appendleft(' No thing to do!')
return

def is_alive(servers, queue):
target = [(self.vpndict[name].ip, self.vpndict[name].port) for name in servers]
Expand Down

0 comments on commit 5f3c59b

Please sign in to comment.