Merge "Rename variables to address pep8 error"

This commit is contained in:
Zuul 2020-05-18 08:40:27 +00:00 committed by Gerrit Code Review
commit 1a1fe76a6a
2 changed files with 5 additions and 5 deletions

View File

@ -396,8 +396,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=''):

View File

@ -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: