Skip to content

Commit

Permalink
isConnected fix from @oopswg due to ExpressVPN changing their client.
Browse files Browse the repository at this point in the history
  • Loading branch information
grjw committed Apr 18, 2020
1 parent 54b3244 commit 87432c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion resources/lib/expressvpn.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ def status(self):
return subprocess.check_output(["expressvpn", "status"])

def isConnected(self):
return subprocess.check_output(["expressvpn", "status"]).startswith("Connected to ")
connected = False
ret = re.search("Connected\ to\ (.+)", self.status())
if ret is not None :
connected = True
return connected

def currentServer(self):
return re.search("Connected\ to\ (.+)", self.status()).group(1)
Expand Down

0 comments on commit 87432c3

Please sign in to comment.