-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae6a63d
commit 5f3c59b
Showing
1 changed file
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
__maintainer__ = "duc_tin" | ||
__email__ = "[email protected]" | ||
|
||
import os | ||
import os, sys | ||
import base64 | ||
import time | ||
import datetime | ||
|
@@ -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 | ||
|
@@ -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] | ||
|