def change_uid(): if is_root() and not cmd_requires_root(): frappe_user = get_config(".").get('frappe_user') if frappe_user: drop_privileges(uid_name=frappe_user, gid_name=frappe_user) os.environ['HOME'] = pwd.getpwnam(frappe_user).pw_dir else: print 'You should not run this command as root' sys.exit(1)
def change_uid(): if is_root() and not cmd_requires_root(): frappe_user = get_config(".").get('frappe_user') if frappe_user: drop_privileges(uid_name=frappe_user, gid_name=frappe_user) os.environ['HOME'] = pwd.getpwnam(frappe_user).pw_dir else: print 'You should not run this command as root' sys.exit(1)
def change_uid(): if is_root() and not cmd_requires_root(): frappe_user = get_config(".").get('frappe_user') if frappe_user: drop_privileges(uid_name=frappe_user, gid_name=frappe_user) os.environ['HOME'] = pwd.getpwnam(frappe_user).pw_dir else: log(change_uid_msg, level=3) sys.exit(1)