backport check_output for 2.6
This commit is contained in:
parent
22ac81650d
commit
69a78db3b3
5 changed files with 34 additions and 6 deletions
|
|
@ -20,8 +20,10 @@
|
|||
|
||||
import re
|
||||
import subprocess
|
||||
from .ordereddict import OrderedDict
|
||||
|
||||
from .compat import check_output
|
||||
from .misc import to_unicode
|
||||
from .ordereddict import OrderedDict
|
||||
|
||||
|
||||
__all__ = ['ValuesDict', 'Value', 'ValueBackendPassword', 'ValueInt', 'ValueFloat', 'ValueBool']
|
||||
|
|
@ -149,7 +151,7 @@ class ValueBackendPassword(Value):
|
|||
if self.is_command(password):
|
||||
cmd = password[1:-1]
|
||||
try:
|
||||
password = subprocess.check_output(cmd, shell=True)
|
||||
password = check_output(cmd, shell=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
raise ValueError(u'The call to the external tool failed: %s' % e)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue