[elbe-devel] [PATCH 2/3] init: fix problem with http_proxy
Torben Hohn
torben.hohn at linutronix.de
Wed Jul 15 17:35:01 CEST 2020
----------------------------------------------------------------------
Traceback (most recent call last):
File "/elbe/elbe", line 62, in <module>
cmdmod.run_command(sys.argv[2:])
File "/elbe/elbepack/commands/init.py", line 136, in run_command
http_proxy = http_proxy.strip().replace("LOCALMACHINE",
AttributeError: 'NoneType' object has no attribute 'strip'
'elbe init' Failed
Giving up
----------------------------------------------------------------------
Fix It
Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
elbepack/commands/init.py | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/elbepack/commands/init.py b/elbepack/commands/init.py
index 3e6b5394a..834cdfd7e 100644
--- a/elbepack/commands/init.py
+++ b/elbepack/commands/init.py
@@ -130,11 +130,8 @@ def run_command(argv):
defs = ElbeDefaults(buildtype)
- http_proxy = ""
- if xml.has("initvm/mirror/primary_proxy"):
- http_proxy = xml.text("initvm/mirror/primary_proxy")
- http_proxy = http_proxy.strip().replace("LOCALMACHINE",
- "localhost")
+ http_proxy = xml.text("/initvm/mirror/primary_proxy", default="")
+ http_proxy = http_proxy.strip().replace("LOCALMACHINE", "localhost")
if opt.cdrom:
mirror = xml.node("initvm/mirror")
--
2.20.1
More information about the elbe-devel
mailing list