You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get this error stack:
$ loco remove-user loco0
Traceback (most recent call last):
File "/home/ec2-user/.local/bin/loco", line 8, in
sys.exit(main())
File "/home/ec2-user/.local/lib/python3.7/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/home/ec2-user/.local/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/ec2-user/.local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ec2-user/.local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ec2-user/.local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/ec2-user/.local/lib/python3.7/site-packages/loco/loco.py", line 136, in remove_user
donotrun(remove_user_fn, user)
NameError: name 'donotrun' is not defined
Looks like the error comes from this function: donotrun is not defined
@main.command()
@click.argument("user", default=USER)
def remove_user(user):
""" Used to remove a loco user """
if user in os.path.expanduser("~"):
raise Exception("Cannot delete self")
if not user.startswith("loco"):
inp = input("Are you sure you want to delete user '{}' [y/N]: ".format(user))
if inp.lower() != "y":
print("Aborting.")
return
os_dependent_functions = {"Darwin": remove_user_osx, "Linux": remove_user_linux}
remove_user_fn = platform_fn(**os_dependent_functions)
donotrun(remove_user_fn, user)
The text was updated successfully, but these errors were encountered:
loco remove-user throwing an exception
I get this error stack:
$ loco remove-user loco0
Traceback (most recent call last):
File "/home/ec2-user/.local/bin/loco", line 8, in
sys.exit(main())
File "/home/ec2-user/.local/lib/python3.7/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/home/ec2-user/.local/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/ec2-user/.local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ec2-user/.local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ec2-user/.local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/ec2-user/.local/lib/python3.7/site-packages/loco/loco.py", line 136, in remove_user
donotrun(remove_user_fn, user)
NameError: name 'donotrun' is not defined
Looks like the error comes from this function: donotrun is not defined
@main.command()
@click.argument("user", default=USER)
def remove_user(user):
""" Used to remove a loco user """
if user in os.path.expanduser("~"):
raise Exception("Cannot delete self")
if not user.startswith("loco"):
inp = input("Are you sure you want to delete user '{}' [y/N]: ".format(user))
if inp.lower() != "y":
print("Aborting.")
return
os_dependent_functions = {"Darwin": remove_user_osx, "Linux": remove_user_linux}
remove_user_fn = platform_fn(**os_dependent_functions)
donotrun(remove_user_fn, user)
The text was updated successfully, but these errors were encountered: