Delay an import, for sake of windows

This commit is contained in:
Lance Edgar 2020-10-06 22:19:35 -05:00
parent 5eb0747d90
commit 8f1b2f1d96

View file

@ -990,8 +990,6 @@ class MakeAppDir(Subcommand):
"of this option probably requires 'sudo' or equivalent.")
def run(self, args):
import pwd
if args.path:
app_path = os.path.abspath(args.path)
if os.path.basename(app_path) != 'app':
@ -1004,6 +1002,7 @@ class MakeAppDir(Subcommand):
os.mkdir(app_path)
if args.user:
import pwd
pwdata = pwd.getpwnam(args.user)
for name in ['batch', 'data', 'log', 'sessions', 'work']:
path = os.path.join(app_path, name)