taskserver/helpertool: Fix error message on export

The error message displays that a specific user doesn't exist in an
organisation, but uses the User object's name attribute to show which
user it was.

This is basically a very stupid chicken and egg problem and easily fixed
by using the user name provided on the command line.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2017-02-17 18:20:53 +01:00
parent a5e9668c5c
commit 32c2e8f4ae
No known key found for this signature in database
GPG Key ID: 1DE8E48E57DB5436

View File

@ -526,7 +526,7 @@ def export_user(organisation, user):
userobj = organisation.get_user(user)
if userobj is None:
msg = "User {} doesn't exist in organisation {}."
sys.exit(msg.format(userobj.name, organisation.name))
sys.exit(msg.format(user, organisation.name))
sys.stdout.write(userobj.export())