Skip to content

Commit

Permalink
fix crash when settings like realname are not set.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
adrianschroeter committed Sep 13, 2023
1 parent a5f56b1 commit 2e8fa9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion osc/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check warning on line 8917 in osc/core.py

View check run for this annotation

Codecov / codecov/patch

osc/core.py#L8916-L8917

Added lines #L8916 - L8917 were not covered by tests


class MultibuildFlavorResolver:
Expand Down

0 comments on commit 2e8fa9e

Please sign in to comment.