We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a26a630 + c4dced4 commit d46b145Copy full SHA for d46b145
iptc/ip4tc.py
@@ -419,6 +419,7 @@ def get_all_parameters(self):
419
res = shlex.split(buf)
420
res.reverse()
421
inv = False
422
+ key = None
423
while len(res) > 0:
424
x = res.pop()
425
if x == '!':
@@ -433,7 +434,11 @@ def get_all_parameters(self):
433
434
params[key] = []
435
436
continue
- params[key].append(x) # This is a parameter value.
437
+ # At this point key should be set, unless the output from save is
438
+ # not formatted right. Let's be defensive, since some users
439
+ # reported that problem.
440
+ if key is not None:
441
+ params[key].append(x) # This is a parameter value.
442
return params
443
444
def _update_parameters(self):
0 commit comments