summaryrefslogtreecommitdiffstats
path: root/ipa-admintools/ipa-usermod
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-admintools/ipa-usermod')
-rw-r--r--ipa-admintools/ipa-usermod6
1 files changed, 5 insertions, 1 deletions
diff --git a/ipa-admintools/ipa-usermod b/ipa-admintools/ipa-usermod
index 3c9f8adc0..0c61f4097 100644
--- a/ipa-admintools/ipa-usermod
+++ b/ipa-admintools/ipa-usermod
@@ -54,7 +54,11 @@ def main():
usage()
client = ipaclient.IPAClient()
- user = client.get_user_by_uid(args[1])
+ try:
+ user = client.get_user_by_uid(args[1])
+ except ipa.ipaerror.IPAError, e:
+ print "%s" % e.message
+ return 1
if options.gecos:
user.setValue('gecos', options.gecos)