more verbose report of an external command failure
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
c3a704be67
commit
987dd2ee1d
1 changed files with 3 additions and 1 deletions
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
from .ordereddict import OrderedDict
|
from .ordereddict import OrderedDict
|
||||||
from .misc import to_unicode
|
from .misc import to_unicode
|
||||||
|
|
||||||
|
|
@ -180,7 +181,8 @@ class ValueBackendPassword(Value):
|
||||||
cmd = passwd[1:-1]
|
cmd = passwd[1:-1]
|
||||||
try:
|
try:
|
||||||
passwd = subprocess.check_output(cmd,shell=True)
|
passwd = subprocess.check_output(cmd,shell=True)
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError as e:
|
||||||
|
print >>sys.stderr, u'The call to the external tool failed: %s' % e
|
||||||
passwd = ''
|
passwd = ''
|
||||||
|
|
||||||
self._value = passwd
|
self._value = passwd
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue