mirror of
https://github.com/os-mnemo/pan-globalprotect-okta
synced 2026-07-31 07:44:38 +02:00
Python3 fixes.
This commit is contained in:
+2
-2
@@ -682,7 +682,7 @@ def choose_gateway_url(conf, gateways):
|
|||||||
break
|
break
|
||||||
if not gateway_host:
|
if not gateway_host:
|
||||||
# this just grabs an arbitrary gateway
|
# this just grabs an arbitrary gateway
|
||||||
gateway_host = gateways.keys().pop()
|
gateway_host = next(iter(gateways))
|
||||||
return 'https://{0}'.format(gateway_host)
|
return 'https://{0}'.format(gateway_host)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@@ -823,7 +823,7 @@ def main():
|
|||||||
if p.returncode == 0:
|
if p.returncode == 0:
|
||||||
p = subprocess.Popen([openconnect_bin, '-V'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
p = subprocess.Popen([openconnect_bin, '-V'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
o = p.communicate()[0]
|
o = p.communicate()[0]
|
||||||
mx = re.search(r'OpenConnect version v(\d)\.(\d+)', o, flags=re.IGNORECASE)
|
mx = re.search(r'OpenConnect version v(\d)\.(\d+)', to_u(o), flags=re.IGNORECASE)
|
||||||
if mx:
|
if mx:
|
||||||
vmajor, vminor = mx.groups()
|
vmajor, vminor = mx.groups()
|
||||||
if vmajor >= '8' and vminor >= '05':
|
if vmajor >= '8' and vminor >= '05':
|
||||||
|
|||||||
Reference in New Issue
Block a user