# -*- coding: utf-8 -*- from traceback import print_exc from module.Api import Destination from module.common.packagetools import parseNames from module.utils import to_list, has_method, uniqify from module.utils.fs import exists, remove, fs_encode from Base import Base, Retry class Package: """ Container that indicates new package should be created """ def __init__(self, name, urls=None, dest=Destination.Queue): self.name = name self.urls = urls if urls else [] self.dest = dest def addUrl(self, url): self.urls.append(url) def __eq__(self, other): return self.name == other.name and self.urls == other.urls def __repr__(self): return u"