Fixed warn_on_root config check

This commit is contained in:
Alexander Taylor 2014-07-06 13:22:05 +01:00
parent b19a6fa22a
commit 170738bc80

View file

@ -967,9 +967,9 @@ class Buildozer(object):
except NameError:
pass
warn_on_root = self.config.getdefault('buildozer', 'warn_on_root', 1)
warn_on_root = self.config.getdefault('buildozer', 'warn_on_root', 'yay')
euid = os.geteuid()
if warn_on_root and euid == 0:
if warn_on_root == '1' and euid == 0:
print('\033[91m\033[1mBuildozer is running as root!\033[0m')
print('\033[91mThis is \033[1mnot\033[0m \033[91mrecommended, and may lead to problems later.\033[0m')
cont = None