def _dirs_are_unequal(dir1, dir2):
 dircmps = [filecmp.dircmp(dir1, dir2)]
 while len(dircmps):
  dircmp = dircmps.pop()
  if (dircmp.left_only or dircmp.right_only):
   logger.error('The following files and directories are only present in one directory')
   if dircmp.left_only:
    logger.error(dircmp.left_only)
   else:
    logger.error(dircmp.right_only)
   return True
  elif (dircmp.common_funny or dircmp.funny_files):
   logger.error('The following files and directories could not be compared:')
   if dircmp.common_funny:
    logger.error(dircmp.common_funny)
   else:
    logger.error(dircmp.funny_files)
   return True
  elif dircmp.diff_files:
   logger.error('The following files differ:')
   logger.error(dircmp.diff_files)
   return True
  for subdir in dircmp.subdirs.itervalues():
   dircmps.append(subdir)
 return False

def _dirs_are_unequal ( dir1 , dir2 ) : dircmps = [ filecmp . dircmp ( dir1 , dir2 ) ] while len ( dircmps ) : dircmp = dircmps . pop ( ) if ( dircmp . left_only or dircmp . right_only ) : logger . error ( 'The following files and directories are only present in one directory' ) if dircmp . left_only : logger . error ( dircmp . left_only ) else : logger . error ( dircmp . right_only ) return True elif ( dircmp . common_funny or dircmp . funny_files ) : logger . error ( 'The following files and directories could not be compared:' ) if dircmp . common_funny : logger . error ( dircmp . common_funny ) else : logger . error ( dircmp . funny_files ) return True elif dircmp . diff_files : logger . error ( 'The following files differ:' ) logger . error ( dircmp . diff_files ) return True for subdir in dircmp . subdirs . itervalues ( ) : dircmps . append ( subdir ) return False
returns true if dir1 and dir2 are unequal .