1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-27 02:16:12 +01:00

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 "<frozen os>", line 684, in __setitem__
  File "<frozen os>", line 758, in encode
TypeError: str expected, not NoneType
This commit is contained in:
Adrian Schröter 2023-09-13 08:36:30 +02:00
parent a5f56b1673
commit 2e8fa9ef12

View File

@ -8913,6 +8913,7 @@ def vc_export_env(apiurl: str, quiet=False):
for (tag, val) in tag2val.items(): for (tag, val) in tag2val.items():
for env in tag2envs[tag]: for env in tag2envs[tag]:
if val:
os.environ[env] = val os.environ[env] = val