strip password command output and take only the first line
This commit is contained in:
parent
13a93d3a9f
commit
d9e33e50b8
1 changed files with 2 additions and 0 deletions
|
|
@ -150,6 +150,8 @@ class ValueBackendPassword(Value):
|
|||
password = subprocess.check_output(cmd, shell=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
raise ValueError(u'The call to the external tool failed: %s' % e)
|
||||
else:
|
||||
password = password.partition('\n')[0].strip('\r\n\t')
|
||||
self.check_valid(password)
|
||||
self._domain = domain
|
||||
self._value = to_unicode(password)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue