def _compute_hash(get_deps_dict, hash, rospack=None):
 from roslib.msgs import MsgSpec
 from roslib.srvs import SrvSpec
 spec = get_deps_dict['spec']
 if isinstance(spec, MsgSpec):
  hash.update(compute_md5_text(get_deps_dict, spec, rospack=rospack).encode())
 elif isinstance(spec, SrvSpec):
  hash.update(compute_md5_text(get_deps_dict, spec.request, rospack=rospack).encode())
  hash.update(compute_md5_text(get_deps_dict, spec.response, rospack=rospack).encode())
 else:
  raise Exception(('[%s] is not a message or service' % spec))
 return hash.hexdigest()

def _compute_hash ( get_deps_dict , hash , rospack = None ) : from roslib . msgs import MsgSpec from roslib . srvs import SrvSpec spec = get_deps_dict [ 'spec' ] if isinstance ( spec , MsgSpec ) : hash . update ( compute_md5_text ( get_deps_dict , spec , rospack = rospack ) . encode ( ) ) elif isinstance ( spec , SrvSpec ) : hash . update ( compute_md5_text ( get_deps_dict , spec . request , rospack = rospack ) . encode ( ) ) hash . update ( compute_md5_text ( get_deps_dict , spec . response , rospack = rospack ) . encode ( ) ) else : raise Exception ( ( '[%s] is not a message or service' % spec ) ) return hash . hexdigest ( )
subroutine of compute_md5() .