- if not os.path.isfile(args.config):
- if args.action and args.action != "init":
- print('ERROR: WayDroid is not initialized, run "waydroid init"')
- return 0
- elif os.geteuid() == 0 and args.action == "init":
- if not os.path.exists(args.work):
- os.mkdir(args.work)
- else:
- args.log = "/tmp/tools.log"
+ if os.geteuid() == 0:
+ if not os.path.exists(args.work):
+ os.mkdir(args.work)
+ elif not os.path.exists(args.log):
+ args.log = "/tmp/tools.log"