NERSC / shifter

Shifter - Linux Containers for HPC
Other
348 stars 65 forks source link

munge.py: use os.strerror() to get error message #276

Closed maxim-belkin closed 4 years ago

maxim-belkin commented 4 years ago

I suggest using os.strerror() to print error message.

dmjacobsen commented 4 years ago

Is munge returning a std errno as its exit code?

dmjacobsen commented 4 years ago

it doesn't look like munge is using standard errno codes for return codes: https://github.com/dun/munge/blob/master/src/munge/unmunge.c#L242

which refer to these statuses: https://github.com/dun/munge/blob/master/src/libmunge/munge.h#L142 So I don't think we can use os.strerror() here, but it might be interesting to integrate libmunge into python and call munge_strerror() to get a better formatted error.

maxim-belkin commented 4 years ago

I haven't thought of looking into munge's error codes. My bad.

I'd be happy to submit another PR to integrate libmunge into python. OK to assume location of libmunge.so?

dmjacobsen commented 4 years ago

I'd be happy to submit another PR to integrate libmunge into python. OK to assume location of libmunge.so?

I think the location of munge should be identified during the ./configure process; there should be a way of getting autoconf to expose that