[jhbuild] Revert root warning commit.



commit 8016a19eeb943e73437670ec34e363b86930d8e7
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Tue Sep 10 10:57:08 2013 +0200

    Revert root warning commit.
    
    This reverts commit 4e0e20c969696fc7861d19fd8d6ca17d57128195.
    
    Pushed by mistake.

 jhbuild/main.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/jhbuild/main.py b/jhbuild/main.py
index 35f3564..e0927cd 100644
--- a/jhbuild/main.py
+++ b/jhbuild/main.py
@@ -94,6 +94,10 @@ def main(args):
         localedir = None
     gettext.install('jhbuild', localedir=localedir, unicode=True)
 
+    if hasattr(os, 'getuid') and os.getuid() == 0:
+        sys.stderr.write(_('You should not run jhbuild as root.\n').encode(_encoding, 'replace'))
+        sys.exit(1)
+
     logging.getLogger().setLevel(logging.INFO)
     logging_handler = logging.StreamHandler()
     logging_handler.setFormatter(LoggingFormatter())


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]