You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jd...@apache.org on 2020/07/12 12:14:25 UTC
[qpid-proton] branch master updated: PROTON-2222 Fix undefined
variable `x` in scripts/env.py (#268)
This is an automated email from the ASF dual-hosted git repository.
jdanek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
The following commit(s) were added to refs/heads/master by this push:
new 7ccb17d PROTON-2222 Fix undefined variable `x` in scripts/env.py (#268)
7ccb17d is described below
commit 7ccb17d2aaae63da4688b043ccc17b597676c6b1
Author: Jiri Daněk <jd...@redhat.com>
AuthorDate: Sun Jul 12 14:14:16 2020 +0200
PROTON-2222 Fix undefined variable `x` in scripts/env.py (#268)
---
scripts/env.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/scripts/env.py b/scripts/env.py
index 443bdca..1447e97 100644
--- a/scripts/env.py
+++ b/scripts/env.py
@@ -46,15 +46,16 @@ def main(argv=None):
z = args[0].split("=", 1)
if len(z) != 2:
break # done with env args
- if len(z[0]) == 0:
- raise Exception("Error: incorrect format for env var: '%s'" % str(args[x]))
+ name, value = z[0], z[1]
+ if len(name) == 0:
+ raise Exception("Error: incorrect format for env var: '%s'" % str(args[0]))
del args[0]
- if len(z[1]) == 0:
+ if len(value) == 0:
# value is not present, so delete it
- if z[0] in new_env:
- del new_env[z[0]]
+ if name in new_env:
+ del new_env[name]
else:
- new_env[z[0]] = z[1]
+ new_env[name] = value
if len(args) == 0 or len(args[0]) == 0:
raise Exception("Error: syntax error in command arguments")
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org