Fixes #20096
This commit is contained in:
parent
fb9d8a2f9c
commit
8c2fae27d6
1 changed files with 4 additions and 7 deletions
|
@ -531,13 +531,10 @@ class User(object):
|
||||||
|
|
||||||
if self.expires:
|
if self.expires:
|
||||||
cmd.append('--expiredate')
|
cmd.append('--expiredate')
|
||||||
try:
|
if self.clearexpires < 0:
|
||||||
if self.clearexpires < 0:
|
cmd.append('')
|
||||||
cmd.append('')
|
else:
|
||||||
else:
|
cmd.append(time.strftime(self.DATE_FORMAT, self.expires))
|
||||||
cmd.append(time.strftime(self.DATE_FORMAT, self.expires))
|
|
||||||
except ValueError:
|
|
||||||
raise
|
|
||||||
|
|
||||||
if self.update_password == 'always' and self.password is not None and info[1] != self.password:
|
if self.update_password == 'always' and self.password is not None and info[1] != self.password:
|
||||||
cmd.append('-p')
|
cmd.append('-p')
|
||||||
|
|
Loading…
Reference in a new issue