Author canvon
Recipients canvon
Date 2016-08-27.09:48:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
When calling syslog.syslog() without calling syslog.openlog() before, openlog() gets called with no arguments. Documentation says: "The optional ident keyword argument is a string which is prepended to every message, and defaults to sys.argv[0] with leading
path components stripped." -- "35.13. syslog — Unix syslog library routines"

It leaves the final slash in, though. This produces syslog output for /usr/sbin/foo with identifier "/foo" instead of "foo". When reading syslog unprepared, one can easily think that to be a bug in the specific python script at hand (which it's not), or a chroot to be involved (which it's not, usually). So I consider this a bug.

On freenode/#python I was referred to for the code that does this.

This issue is forwarded from a minor bug report reported by me at Debian:

A test script is attached, which, when called with absolute path, produces this in syslog:

  Aug 27 08:53:27 blackbox / Test from python!

The slash is misleading/wrong.
Date User Action Args
2016-08-27 09:48:31canvonsetrecipients: + canvon
2016-08-27 09:48:31canvonsetmessageid: <>
2016-08-27 09:48:31canvonlinkissue27875 messages
2016-08-27 09:48:31canvoncreate