Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKaerst committed Feb 28, 2018
1 parent fb9d8a2 commit 8c2fae2
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lib/ansible/modules/system/user.py
Expand Up @@ -531,13 +531,10 @@ def modify_user_usermod(self):

if self.expires:
cmd.append('--expiredate')
try:
if self.clearexpires < 0:
cmd.append('')
else:
cmd.append(time.strftime(self.DATE_FORMAT, self.expires))
except ValueError:
raise
if self.clearexpires < 0:
cmd.append('')
else:
cmd.append(time.strftime(self.DATE_FORMAT, self.expires))

if self.update_password == 'always' and self.password is not None and info[1] != self.password:
cmd.append('-p')
Expand Down

0 comments on commit 8c2fae2

Please sign in to comment.