Learn more about these different git repos.
Other Git URLs
Using mutable default arguments in Python is usually a bad idea. There are, at least, two places in this code base that make use of it.
in freshmaker/handlers/__init__.py:
freshmaker/handlers/__init__.py
469 @fail_artifact_build_on_handler_exception(whitelist=[ODCSComposeNotReady]) 470 def build_image_artifact_build(self, build, repo_urls=[]): ... ... 556 repo_urls.append(odcs_compose["result_repofile"])
The append call actually changes the default argument!
append
In freshmaker/odcsclient.py:
freshmaker/odcsclient.py
101 def _fake_odcs_new_compose( 102 self, compose_source, tag, packages=None, results=[], 103 builds=None): ... 128 if results: 129 new_compose['results'] = ['boot.iso']
This one is weird... Why is ['boot.iso'] being used and not results? Looking at the calls to _fake_odcs_new_compose, the results argument may not actually be used.
['boot.iso']
results
_fake_odcs_new_compose
Commit cc05c9b fixes this issue
Login to comment on this ticket.