def DropPrivileges():
 if config_lib.CONFIG['Server.username']:
  try:
   os.setuid(pwd.getpwnam(config_lib.CONFIG['Server.username']).pw_uid)
  except (KeyError, OSError):
   logging.exception('Unable to switch to user %s', config_lib.CONFIG['Server.username'])
   raise

def DropPrivileges ( ) : if config_lib . CONFIG [ 'Server.username' ] : try : os . setuid ( pwd . getpwnam ( config_lib . CONFIG [ 'Server.username' ] ) . pw_uid ) except ( KeyError , OSError ) : logging . exception ( 'Unable to switch to user %s' , config_lib . CONFIG [ 'Server.username' ] ) raise
attempt to drop privileges if required .