> Yeah. However, piuparts really needs to be run as root, and if you are
> root but your PATH doesn't contain those directories, something's wrong.
> Can you confirm that you're not running as root?
I confirm that I was running piuparts as non root.
Even if we consider that a user with root privileges has by default
/usr/sbin/ in his path, the issue of the Python traceback remains.
You could possibly add a UID test in the __main__ function [1] ?
Regards,
Ignace M
[1]
--- piuparts-0.35.orig/piuparts.py 2009-07-24 15:30:30.000000000 +0200
+++ piuparts-0.35/piuparts.py 2009-07-24 17:52:52.000000000 +0200
@@ -1933,6 +1933,11 @@
if __name__ == "__main__":
+ # check if user has root privileges
+ if os.getuid():
+ print "You need to be root to use this command."
+ sys.exit(0)
+
if sys.argv[1:] == ["unittest"]:
del sys.argv[1]
unittest.main()
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]