Skip to content
Snippets Groups Projects
Commit 8fd3b044 authored by Bharat Kunwar's avatar Bharat Kunwar
Browse files

Rename variables to address pep8 error

Without rename, we see this:
    E741 ambiguous variable name 'l'

Change-Id: Ic1d357db594dd6f8f8db162033b6cf408e84453c
Story: 2007515
Task: 39775
(cherry picked from commit 1c1cfd71)
parent 75fec051
No related branches found
No related tags found
No related merge requests found
...@@ -404,8 +404,8 @@ def get_service_type(f): ...@@ -404,8 +404,8 @@ def get_service_type(f):
return getattr(f, 'service_type', None) return getattr(f, 'service_type', None)
def pretty_choice_list(l): def pretty_choice_list(lst):
return ', '.join("'%s'" % i for i in l) return ', '.join("'%s'" % i for i in lst)
def exit(msg=''): def exit(msg=''):
......
...@@ -118,12 +118,12 @@ def format_labels(lbls, parse_comma=True): ...@@ -118,12 +118,12 @@ def format_labels(lbls, parse_comma=True):
lbls = lbls[0].replace(';', ',').split(',') lbls = lbls[0].replace(';', ',').split(',')
labels = {} labels = {}
for l in lbls: for lbl in lbls:
try: try:
(k, v) = l.split(('='), 1) (k, v) = lbl.split(('='), 1)
except ValueError: except ValueError:
raise exc.CommandError(_('labels must be a list of KEY=VALUE ' raise exc.CommandError(_('labels must be a list of KEY=VALUE '
'not %s') % l) 'not %s') % lbl)
if k not in labels: if k not in labels:
labels[k] = v labels[k] = v
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment