Ticket #29 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

Error in pkrefund when run through sudo

Reported by: jerome Owned by: jerome
Priority: major Milestone:
Component: pykota Version: stable
Keywords: Cc:

Description

os.getlogin() raises an OSError when it's called from a sudo run command:

ERROR: PyKota v1.26_fixes_official
ERROR: pkrefund failed
ERROR: Traceback (most recent call last):
ERROR: File "/usr/bin/pkrefund", line 444, in <module>
ERROR: retcode = refundmanager.main(args, options)
ERROR: File "/usr/bin/pkrefund", line 371, in main
ERROR: job.refund(reason)
ERROR: File "/usr/lib/python2.5/site-packages/pykota/storage.py", line 494, in refund
ERROR: os.getlogin(),
ERROR: OSError: [Errno 2] No such file or directory

Change History

Changed 14 years ago by jerome

  • status changed from new to closed
  • resolution set to fixed

(In [3444]) Doesn't break when there's an error retrieving the login name (when run
through sudo). Fixes #29.

Changed 14 years ago by jerome

(In [3445]) Ported code from the 1.26_fixes branch. References #29.

Note: See TracTickets for help on using tickets.