X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/791d9709918a6ebf0945b0aa1eca18031c95baf7..65df4922950433b7769224cf843fe2003f0a3d11:/tools/__init__.py diff --git a/tools/__init__.py b/tools/__init__.py index 13a6110..62c2b92 100644 --- a/tools/__init__.py +++ b/tools/__init__.py @@ -36,7 +36,8 @@ def main(): print('ERROR: WayDroid is not initialized, run "waydroid init"') return 0 elif os.geteuid() == 0 and args.action == "init": - os.mkdir(args.work) + if not os.path.exists(args.work): + os.mkdir(args.work) else: args.log = "/tmp/tools.log" @@ -63,7 +64,7 @@ def main(): actions.container_manager.start(args) elif args.subaction == "stop": actions.container_manager.stop(args) - if args.subaction == "restart": + elif args.subaction == "restart": actions.container_manager.restart(args) elif args.subaction == "freeze": actions.container_manager.freeze(args)