From e1a6f3ef0ee6976cddbc46c216a8530bd6490f93 Mon Sep 17 00:00:00 2001 From: suhaiming Date: Mon, 28 Dec 2020 01:26:13 +0000 Subject: [PATCH] delete redundant parenthese and variable name Change-Id: Ide4dbedf8367dfeecee2a95e9faed79b983f1e13 --- venus/api/openstack/wsgi.py | 2 +- venus/cmd/manage.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/venus/api/openstack/wsgi.py b/venus/api/openstack/wsgi.py index a90d74c..ef120d9 100644 --- a/venus/api/openstack/wsgi.py +++ b/venus/api/openstack/wsgi.py @@ -1001,7 +1001,7 @@ class Resource(wsgi.Application): project_id = action_args.pop("project_id", None) context = request.environ.get('venus.context') - if (context and project_id and (project_id != context.project_id)): + if context and project_id and (project_id != context.project_id): msg = _("Malformed request url") return Fault(webob.exc.HTTPBadRequest(explanation=msg)) diff --git a/venus/cmd/manage.py b/venus/cmd/manage.py index f1b803a..91cb3ce 100644 --- a/venus/cmd/manage.py +++ b/venus/cmd/manage.py @@ -224,7 +224,6 @@ class GetLogCommands(object): """Get of the venus syslog events.""" entries = int(num_entries) count = 0 - log_file = '' if os.path.exists('/var/log/syslog'): log_file = '/var/log/syslog' elif os.path.exists('/var/log/messages'): @@ -305,7 +304,6 @@ category_opt = cfg.SubCommandOpt('category', def get_arg_string(args): - arg = None if args[0] == '-': # (Note)zhiteng: args starts with FLAGS.oparser.prefix_chars # is optional args. Notice that cfg module takes care of