From 1c1cfd710977503ec521ee4143d3b0bf5371b5c8 Mon Sep 17 00:00:00 2001 From: Bharat Kunwar Date: Thu, 14 May 2020 11:33:50 +0000 Subject: [PATCH] Rename variables to address pep8 error Without rename, we see this: E741 ambiguous variable name 'l' Change-Id: Ic1d357db594dd6f8f8db162033b6cf408e84453c Story: 2007515 Task: 39775 --- magnumclient/common/cliutils.py | 4 ++-- magnumclient/common/utils.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/magnumclient/common/cliutils.py b/magnumclient/common/cliutils.py index 34ab129b..7061f3b3 100644 --- a/magnumclient/common/cliutils.py +++ b/magnumclient/common/cliutils.py @@ -404,8 +404,8 @@ def get_service_type(f): return getattr(f, 'service_type', None) -def pretty_choice_list(l): - return ', '.join("'%s'" % i for i in l) +def pretty_choice_list(lst): + return ', '.join("'%s'" % i for i in lst) def exit(msg=''): diff --git a/magnumclient/common/utils.py b/magnumclient/common/utils.py index 56571f83..3af5b678 100644 --- a/magnumclient/common/utils.py +++ b/magnumclient/common/utils.py @@ -118,12 +118,12 @@ def format_labels(lbls, parse_comma=True): lbls = lbls[0].replace(';', ',').split(',') labels = {} - for l in lbls: + for lbl in lbls: try: - (k, v) = l.split(('='), 1) + (k, v) = lbl.split(('='), 1) except ValueError: raise exc.CommandError(_('labels must be a list of KEY=VALUE ' - 'not %s') % l) + 'not %s') % lbl) if k not in labels: labels[k] = v else: