disable deprecation warnings on md5/sha due to pycrypto. pycrypto is end-of-life, at least until the new maintainer releases an update
This commit is contained in:
parent
12f7ed912a
commit
f9fcd00589
|
@ -67,6 +67,11 @@ class SSHChildROSLaunchProcess(roslaunch.server.ChildROSLaunchProcess):
|
|||
env_command = "env "+' '.join(["%s=%s"%(k,v) for (k, v) in env.iteritems()])
|
||||
command = "%s %s"%(env_command, command)
|
||||
try:
|
||||
# as pycrypto 2.0.1 is EOL, disable it's Python 2.6 deprecation warnings
|
||||
import warnings
|
||||
warnings.filterwarnings("ignore", message="the sha module is deprecated; use the hashlib module instead")
|
||||
warnings.filterwarnings("ignore", message="the md5 module is deprecated; use hashlib instead")
|
||||
|
||||
import Crypto
|
||||
except ImportError, e:
|
||||
_logger.error("cannot use SSH: pycrypto is not installed")
|
||||
|
|
Loading…
Reference in New Issue