Ejemplo n.º 1
0
    def __init__(self, gdi, *args, **kwargs):
        # We obviously override the init to add support for our modifications
        self._gdi = gdi
        if not gdi:
            print("No gdi file provided")
            raise GDIException("No gdi file provided")
            return

        self._dict1 = [i for i in gdi if i['lba']
                       == 45000][0]  # That's ugly but it works
        self._dirname = os.path.dirname(self._dict1['filename'])
        self._dict2 = None
        if len(gdi) > self._dict1['tnum']:
            self._dict2 = gdi[-1]

        self._last_read_toc_sector = 0  # Last read TOC sector *SO FAR*

        self._gdifile = AppendedFiles(self._dict1, self._dict2)

        _ISO9660_orig.__init__(self, 'url')  # So url doesn't starts with http

        if 'verbose' in kwargs:
            self._verbose = kwargs.pop('verbose')
        else:
            self._verbose = False
Ejemplo n.º 2
0
    def __init__(self, *args, **kwargs):
        # We obviously override the init to add support for our modifications
        self._dict1 = args[0]
        self._dirname = os.path.dirname(self._dict1['filename'])
        self._dict2 = None
        if len(args) > 1:
            if type(args[1]) == type({}):
                self._dict2 = args[1]

        self._gdifile = AppendedFiles(self._dict1, self._dict2)

        _ISO9660_orig.__init__(self, 'url')  # So url doesn't starts with http

        if kwargs.has_key('verbose'):
            self._verbose = kwargs.pop('verbose')
        else:
            self._verbose = False