about summary refs log tree commit diff
path: root/nixos/modules/services/misc
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2017-02-17 18:20:53 +0100
committeraszlig <aszlig@redmoonstudios.org>2017-02-17 19:45:52 +0100
commit32c2e8f4aeea5a35302b450ed4233dd1af6b22c8 (patch)
tree5627302fabb5a6d74e01a3d29a9975a367c0ba7f /nixos/modules/services/misc
parenta5e9668c5c2a43703a4f49ae673909c66acf7785 (diff)
downloadnixlib-32c2e8f4aeea5a35302b450ed4233dd1af6b22c8.tar
nixlib-32c2e8f4aeea5a35302b450ed4233dd1af6b22c8.tar.gz
nixlib-32c2e8f4aeea5a35302b450ed4233dd1af6b22c8.tar.bz2
nixlib-32c2e8f4aeea5a35302b450ed4233dd1af6b22c8.tar.lz
nixlib-32c2e8f4aeea5a35302b450ed4233dd1af6b22c8.tar.xz
nixlib-32c2e8f4aeea5a35302b450ed4233dd1af6b22c8.tar.zst
nixlib-32c2e8f4aeea5a35302b450ed4233dd1af6b22c8.zip
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>
Diffstat (limited to 'nixos/modules/services/misc')
-rw-r--r--nixos/modules/services/misc/taskserver/helper-tool.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/taskserver/helper-tool.py b/nixos/modules/services/misc/taskserver/helper-tool.py
index 03e7cdf8987a..9c662ef047c1 100644
--- a/nixos/modules/services/misc/taskserver/helper-tool.py
+++ b/nixos/modules/services/misc/taskserver/helper-tool.py
@@ -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())