koji build: a command to build packages on koji#52
Conversation
a0fb373 to
c4eb3d8
Compare
2fab0de to
2512e0b
Compare
c4eb3d8 to
f2e4ce2
Compare
imported from https://github.com/xcp-ng/xcp/ Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
2512e0b to
ba4edca
Compare
f2e4ce2 to
e910f3a
Compare
| @@ -0,0 +1,16 @@ | |||
| from xcp_ng_dev.koji.build import koji_build, koji_build_init_parser | |||
|
|
|||
| # from icecream import ic | |||
There was a problem hiding this comment.
https://github.com/gruns/icecream
A function similar to rust's dbg!() macro
| def cd(dir): | ||
| """Change to a directory temporarily. To be used in a with statement.""" | ||
| prevdir = os.getcwd() | ||
| os.chdir(dir) |
There was a problem hiding this comment.
This can fail if the directory fails, maybe try and catch it the same way as in check_dir?
There was a problem hiding this comment.
You don't think the default error message is enough?
FileNotFoundError: [Errno 2] No such file or directory: '/tsrntsrn'
There was a problem hiding this comment.
I usually prefer not to show stack traces for errors if they are not needed, we can leave it like this for now
There was a problem hiding this comment.
So am I, but not everyone agrees with that.
In my projects, I usually have a command-line flag to change the verbosity and turn on the stack traces on the trace log level. I might do that here as well, in the future.
ydirson
left a comment
There was a problem hiding this comment.
As we discussed this week, this would not be the right tool to merge the koji support into
|
We need a design, something, before such PRs. |
Imported from https://github.com/xcp-ng/xcp/