Skip to content

Commit a95fe2d

Browse files
committed
pycodestyle
1 parent 06ee582 commit a95fe2d

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

bin/panxapi.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ def main():
7070

7171
try:
7272
xapi = pan.xapi.PanXapi(timeout=options['timeout'],
73-
tag=None if not options['tag'] else options['tag'],
73+
tag=None if not options['tag']
74+
else options['tag'],
7475
use_http=options['use_http'],
7576
use_get=options['use_get'],
7677
api_username=options['api_username'],
@@ -164,7 +165,7 @@ def main():
164165
action = 'dynamic-update'
165166
kwargs = {
166167
'cmd': options['cmd'],
167-
}
168+
}
168169
if options['ad_hoc'] is not None:
169170
extra_qs_used = True
170171
kwargs['extra_qs'] = options['ad_hoc']
@@ -279,7 +280,7 @@ def main():
279280
kwargs = {
280281
'cmd': options['op'],
281282
'cmd_xml': options['cmd_xml'],
282-
}
283+
}
283284
if options['ad_hoc'] is not None:
284285
extra_qs_used = True
285286
kwargs['extra_qs'] = options['ad_hoc']
@@ -327,7 +328,7 @@ def main():
327328
'sync': options['sync'],
328329
'interval': options['interval'],
329330
'timeout': options['job_timeout'],
330-
}
331+
}
331332
if options['ad_hoc'] is not None:
332333
extra_qs_used = True
333334
kwargs['extra_qs'] = options['ad_hoc']
@@ -432,7 +433,7 @@ def parse_opts():
432433
'element': None,
433434
'cmd': None,
434435
'timeout': None,
435-
}
436+
}
436437

437438
valid_where = ['after', 'before', 'top', 'bottom']
438439

@@ -483,14 +484,14 @@ def parse_opts():
483484
options['force'] = True
484485
elif opt == '--partial':
485486
if arg:
486-
l = get_parts(arg)
487-
[options['partial'].append(s) for s in l]
487+
x = get_parts(arg)
488+
[options['partial'].append(s) for s in x]
488489
elif opt == '--sync':
489490
options['sync'] = True
490491
elif opt == '--vsys':
491492
if arg:
492-
l = get_vsys(arg)
493-
[options['vsys'].append(s) for s in l]
493+
x = get_vsys(arg)
494+
[options['vsys'].append(s) for s in x]
494495
elif opt == '-A':
495496
options['commit_all'] = True
496497
options['cmd'] = get_element(arg)

lib/pan/commit.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
'shared-object-excluded',
2626
'no-vsys',
2727
'vsys',
28-
])
28+
])
2929

3030
_part_xml = {
3131
'device-and-network-excluded':
@@ -38,7 +38,7 @@
3838
'<no-vsys></no-vsys>',
3939
'vsys':
4040
'<member>%s</member>',
41-
}
41+
}
4242

4343

4444
def valid_part(part):
@@ -94,7 +94,7 @@ def vsys(self, vsys):
9494
part = 'vsys'
9595
self.partial.add(part)
9696

97-
if type(vsys) == type(''):
97+
if isinstance(vsys, str):
9898
vsys = [vsys]
9999
for name in vsys:
100100
self._vsys.add(name)

lib/pan/xapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ def __api_request(self, query):
502502

503503
kwargs = {
504504
'url': request,
505-
}
505+
}
506506

507507
# see PEP 476; urlopen() has context
508508
if self.ssl_context is None:
@@ -587,7 +587,7 @@ def keygen(self, extra_qs=None):
587587
'type': 'keygen',
588588
'user': self.api_username,
589589
'password': self.api_password,
590-
}
590+
}
591591
if self.serial is not None:
592592
query['target'] = self.serial
593593
if extra_qs is not None:

0 commit comments

Comments
 (0)