Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while removing user #25

Open
4pr0n opened this issue Jun 26, 2014 · 1 comment
Open

Error while removing user #25

4pr0n opened this issue Jun 26, 2014 · 1 comment

Comments

@4pr0n
Copy link
Owner

4pr0n commented Jun 26, 2014

This comes up when I tried to the new --remove USER feature:

[2014-06-26T08:14:07Z] Gonewild: [!] Error: remove_user() got an unexpected keyword argument 'new'

@psycho202
Copy link

The issue is around line 639.

You copy-pasted the args.add to repurpose it for args.remove:

	elif args.add:
		users = args.add.replace('u/', '').replace('/', '').split(',')
		for user in users:
			if not gw.db.user_already_added(user):
				gw.db.add_user(user, new=True)
				gw.debug('Add new user: /u/%s' % user)
			else:
				gw.debug('Warning: User already added: /u/%s' % user)
	elif args.remove:
		users = args.remove.replace('u/', '').replace('/', '').split(',')
		for user in users:
			if gw.db.user_already_added(user):
				gw.db.remove_user(user, new=True)
				gw.debug('Add new user: /u/%s' % user)
			else:
				gw.debug('Warning: User already added: /u/%s' % user)

change the args.remove to the following to fix:

	elif args.remove:
		users = args.remove.replace('u/', '').replace('/', '').split(',')
		for user in users:
			if gw.db.user_already_added(user):
				gw.db.remove_user(user)
				gw.debug('Removed user: /u/%s' % user)
			else:
				gw.debug('Warning: User not in Database: /u/%s' % user)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants