mirror of
https://github.com/os-mnemo/pan-globalprotect-okta
synced 2026-07-31 15:54:36 +02:00
Remove whitespace and fix style.
This commit is contained in:
+2
-3
@@ -96,13 +96,13 @@ def load_conf(cf):
|
||||
for rline in fp:
|
||||
line_nr += 1
|
||||
line = rline.strip()
|
||||
mx = re.match('^\s*([^=\s]+)\s*=\s*(.*?)\s*(?:#\s+.*)?\s*$', line)
|
||||
mx = re.match(r'^\s*([^=\s]+)\s*=\s*(.*?)\s*(?:#\s+.*)?\s*$', line)
|
||||
if mx:
|
||||
k, v = mx.group(1).lower(), mx.group(2)
|
||||
if k.startswith('#'):
|
||||
continue
|
||||
for q in '"\'':
|
||||
if re.match('^{0}.*{0}$'.format(q), v):
|
||||
if re.match(r'^{0}.*{0}$'.format(q), v):
|
||||
v = v[1:-1]
|
||||
conf[k] = v
|
||||
conf['{0}.line'.format(k)] = line_nr
|
||||
@@ -184,7 +184,6 @@ def send_req(conf, s, name, url, data, **kwargs):
|
||||
dbg(conf.get('debug'), '{0}.response'.format(name), rr)
|
||||
if do_json:
|
||||
return r.headers, parse_rjson(r)
|
||||
else:
|
||||
return r.headers, r.text
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user