コード例 #1
0
ファイル: __main__.py プロジェクト: minacel/anvil
def ensure_perms():
    # Ensure we are running as root to start...
    if not sh.got_root():
        raise excp.PermException("Root access required")
コード例 #2
0
def ensure_perms():
    # Ensure we are running as root to start...
    if not sh.got_root():
        raise excp.PermException("Root access required")
    # Drop to usermode (which also ensures we can do this...)
    sh.user_mode(quiet=False)
コード例 #3
0
ファイル: __main__.py プロジェクト: pombredanne/anvil
def ensure_perms():
    # Ensure we are running as root to start...
    if not sh.got_root():
        raise excp.PermException("Root access required")
コード例 #4
0
def ensure_perms():
    # Ensure we are running as root to start...
    if not sh.got_root():
        raise excp.PermException("Root access required")
    # Drop to usermode (which also ensures we can do this...)
    sh.user_mode(quiet=False)