osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40970?usp=email )


Change subject: testenv: fix missing hasattr check
......................................................................

testenv: fix missing hasattr check

Fix that commands without a --distro argument ("./testenv.py init osmo-dev"
and "./testenv.py clean") fail with:

  AttributeError: 'Namespace' object has no attribute 'distro'

Fixes: 8d21add6 ("testenv: check for --distro without --podman")
Change-Id: I138fda5f5807588428bba4eb1593b887fe7357c9
---
M _testenv/testenv/__init__.py
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/70/40970/1

diff --git a/_testenv/testenv/__init__.py b/_testenv/testenv/__init__.py
index 7a453a5..44e0e92 100644
--- a/_testenv/testenv/__init__.py
+++ b/_testenv/testenv/__init__.py
@@ -279,7 +279,7 @@
 def set_args_defaults():
     """Some defaults are set later, e.g. after verifying that --distro is not
     being used without --podman."""
-    if args.distro is None:
+    if hasattr(args, "distro") and args.distro is None:
         args.distro = distro_default



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40970?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I138fda5f5807588428bba4eb1593b887fe7357c9
Gerrit-Change-Number: 40970
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osm...@sysmocom.de>

Reply via email to