Commit fab6f2fc authored by Tomáš Peterka's avatar Tomáš Peterka

Modifying user should not raise when it fails

parent 296c10f3
...@@ -971,7 +971,8 @@ class User(object): ...@@ -971,7 +971,8 @@ class User(object):
user_parameter_list.append('-r') user_parameter_list.append('-r')
callAndRead(['useradd'] + user_parameter_list) callAndRead(['useradd'] + user_parameter_list)
else: else:
callAndRead(['usermod'] + user_parameter_list) # if the user is already created and used we should not fail
callAndRead(['usermod'] + user_parameter_list, raise_on_error=False)
# lock the password of user # lock the password of user
callAndRead(['passwd', '-l', self.name]) callAndRead(['passwd', '-l', self.name])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment