From 2e8fa9ef12a68f95295c713c7f0a6264447e3b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Wed, 13 Sep 2023 08:36:30 +0200 Subject: [PATCH] fix crash when settings like realname are not set. Otherwise: File "/usr/lib/python3.11/site-packages/osc/core.py", line 451, in execute result = self._execute(dir, old_dir, callmode, singleservice, verbose) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/osc/core.py", line 493, in _execute vc_export_env(self.apiurl) File "/usr/lib/python3.11/site-packages/osc/core.py", line 8917, in vc_export_env os.environ[env] = val ~~~~~~~~~~^^^^^ File "", line 684, in __setitem__ File "", line 758, in encode TypeError: str expected, not NoneType --- osc/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osc/core.py b/osc/core.py index 25c374a4b6..5250e3c230 100644 --- a/osc/core.py +++ b/osc/core.py @@ -8913,7 +8913,8 @@ def vc_export_env(apiurl: str, quiet=False): for (tag, val) in tag2val.items(): for env in tag2envs[tag]: - os.environ[env] = val + if val: + os.environ[env] = val class MultibuildFlavorResolver: