minor fixes and cleanups

This commit is contained in:
The MMGen Project 2021-07-29 14:20:44 +00:00
commit bab1242817
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
11 changed files with 74 additions and 54 deletions

View file

@ -54,7 +54,11 @@ opts_data = {
cmd_args = opts.init(opts_data)
if len(cmd_args): opts.usage()
if g.platform == 'linux' and os.getenv('USER') != 'root':
die(1,'This program must be run as root')
if len(cmd_args):
opts.usage()
mod_dir = os.path.split(normalize_path(modpath_save))[0]
mod_pardir = os.path.split(mod_dir)[0]