If self.getUrl() returns S_OK/S_ERROR structure, the result must be checked:
  
  result = self.getUrl( urlDict['surl'] )
  if not result['OK']:
     do something to cope with the error
  elif result['Value']:
     path = urls[result['Value']] 

  Unfortunately, developers are often lazy to check the result, this is a bad practice