From 58fa6a3bf2600b8cb6338158c32d306a99658236 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Tue, 5 Jan 2010 15:56:57 +0100 Subject: Add hint on not being root --- layman/db.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/layman/db.py b/layman/db.py index 90cd87e..58b6b8d 100644 --- a/layman/db.py +++ b/layman/db.py @@ -267,7 +267,10 @@ class RemoteDB(Overlays): # Check for sufficient privileges if not os.access(mpath, os.W_OK): - OUT.warn('You do not have permission to update the cache') + OUT.warn('You do not have permission to update the cache.') + import getpass + if getpass.getuser() != 'root': + OUT.warn('Hint: You are not root.') return try: -- cgit v1.2.3-1-g7c22