def chugid_and_umask(runas, umask):
 if (runas is not None):
  chugid(runas)
 if (umask is not None):
  os.umask(umask)

def chugid_and_umask ( runas , umask ) : if ( runas is not None ) : chugid ( runas ) if ( umask is not None ) : os . umask ( umask )
helper method for for subprocess .