haani-niyaz
5/10/2017 - 11:29 AM

Inform user to run command as privileged user

Inform user to run command as privileged user

import os
import errno

try:
  # do something
except OSError, e:
    if e.errno == errno.EACCES:
        log.error('Must run as privileged user')
    else:
        raise