I made a few small changes in upload.cgi script. They are basically just refactoring by moving pieces of code from main into their own separate functions.
There is an added value though. A different config file can be specified via DISTGIT_CONFIG environment variable (which is useful e.g. for tests) and the upload.cgi can be executed even when python fedmsg package is not installed (which is valuable for non-Fedora instances).
Thank you very much for your work. If you can fix that one comment regarding md5, that would be great. Otherwise, I'll merge and fix it by a separate commit.
I made a few small changes in
upload.cgi
script. They are basically just refactoring by moving pieces of code frommain
into their own separate functions.There is an added value though. A different config file can be specified via
DISTGIT_CONFIG
environment variable (which is useful e.g. for tests) and theupload.cgi
can be executed even when pythonfedmsg
package is not installed (which is valuable for non-Fedora instances).