def DirCheck(path):
 path = PathCheck(path)
 if (not os.path.isdir(path)):
  raise ValueError((_('Not a directory: %s') % path))
 return path

def DirCheck ( path ) : path = PathCheck ( path ) if ( not os . path . isdir ( path ) ) : raise ValueError ( ( _ ( 'Not a directory: %s' ) % path ) ) return path
verify that a string is a valid path to a directory .