Ejemplo n.º 1
0
    def file(self, file_serialized):
        m = uuid_regex.search(file_serialized)

        if not m:
            raise ValueError("Couldn't find UUID")

        f = File(m.group(0), self)

        if file_serialized.startswith("http"):
            f._cached_url = file_serialized

        return f