# Path: pysmi/reader/base.py
# class AbstractReader(object):
#     maxMibSize = 10000000  # MIBs can't be that large
#     fuzzyMatching = True  # try different file names while searching for MIB
#     originalMatching = uppercaseMatching = lowcaseMatching = True
#     exts = ['',
#             os.path.extsep + 'txt',
#             os.path.extsep + 'mib',
#             os.path.extsep + 'my']
#     exts.extend([x.upper() for x in exts if x])
# 
#     def setOptions(self, **kwargs):
#         for k in kwargs:
#             setattr(self, k, kwargs[k])
#         return self
# 
#     def getMibVariants(self, mibname, **options):
#         filenames = []
# 
#         if self.originalMatching:
#             filenames.append(mibname)
# 
#         if self.uppercaseMatching:
#             filenames.append(mibname.upper())
# 
#         if self.lowcaseMatching:
#             filenames.append(mibname.lower())
# 
#         if self.fuzzyMatching:
#             part = filenames[-1].find('-mib')
#             if part != -1:
#                 filenames.extend(
#                     [x[:part] for x in filenames]
#                 )
#             else:
#                 suffixed = mibname + '-mib'
#                 filenames.append(suffixed.upper())
#                 filenames.append(suffixed.lower())
# 
#         return ((x, x + y) for x in filenames
#                 for y in options.get('exts', self.exts))
# 
#     def getData(self, filename, **options):
#         raise NotImplementedError()
# 
# Path: pysmi/mibinfo.py
# class MibInfo(object):
#     #: actual MIB name
#     name = ''
# 
#     #: possible alternative to MIB name
#     alias = ''
# 
#     #: URL to MIB file
#     path = ''
# 
#     #: MIB file name
#     file = ''
# 
#     #: MIB file modification time
#     mtime = 0
# 
#     #: module OID
#     oid = ''
# 
#     #: MIB revision as `datetime`
#     revision = None
# 
#     #: all OIDs defined in this module
#     oids = ()
# 
#     #: MODULE-IDENTITY OID
#     identity = ''
# 
#     #: Enterprise OID
#     enterprise = ()
# 
#     #: MODULE-COMPLIANCE OIDs
#     compliance = ()
# 
#     #: imported MIB names
#     imported = ()
# 
#     def __init__(self, **kwargs):
#         for k in kwargs:
#             setattr(self, k, kwargs[k])
# 
# Path: pysmi/compat.py
# def decode(s):
#     if isinstance(s, bytes):
#         s = s.decode('utf-8', 'ignore')
#     return s
# 
# Path: pysmi/debug.py
# class Printer(object):
#     class NullHandler(logging.Handler):
# class Debug(object):
#     def __init__(self, logger=None, handler=None, formatter=None):
#     def __call__(self, msg):
#     def __str__(self):
#     def getCurrentLogger(self):
#         def emit(self, record):
#     def __init__(self, *flags, **options):
#     def __str__(self):
#     def __call__(self, msg):
#     def __and__(self, flag):
#     def __rand__(self, flag):
#     def getCurrentPrinter(self):
#     def getCurrentLogger(self):
# def setLogger(l):
# 
# Path: pysmi/error.py
# class PySmiError(Exception):
# class PySmiLexerError(PySmiError):
# class PySmiParserError(PySmiLexerError):
# class PySmiSyntaxError(PySmiParserError):
# class PySmiSearcherError(PySmiError):
# class PySmiFileNotModifiedError(PySmiSearcherError):
# class PySmiFileNotFoundError(PySmiSearcherError):
# class PySmiReaderError(PySmiError):
# class PySmiReaderFileNotModifiedError(PySmiReaderError):
# class PySmiReaderFileNotFoundError(PySmiReaderError):
# class PySmiCodegenError(PySmiError):
# class PySmiSemanticError(PySmiCodegenError):
# class PySmiWriterError(PySmiError):
#     def __init__(self, *args, **kwargs):
#     def __repr__(self):
#     def __str__(self):
#     def __str__(self):


import os
import sys
import time
import datetime
import zipfile
from pysmi.reader.base import AbstractReader
from pysmi.mibinfo import MibInfo
from pysmi.compat import decode
from pysmi import debug
from pysmi import error

        return dataObj, mtime

    def __str__(self):
        return '%s{"%s"}' % (self.__class__.__name__, self._name)

    def getData(self, mibname, **options):
        debug.logger & debug.flagReader and debug.logger('looking for MIB %s at %s' % (mibname, self._name))

        if self._pendingError:
            raise self._pendingError

        if not self._members:
            raise error.PySmiReaderFileNotFoundError('source MIB %s not found' % mibname, reader=self)

        for mibalias, mibfile in self.getMibVariants(mibname, **options):

            debug.logger & debug.flagReader and debug.logger('trying MIB %s' % mibfile)

            try:
                refs = self._members[mibfile]

            except KeyError:
                continue

            mibData, mtime = self._readZipFile(refs)

            if not mibData:
                continue


# Path: pysmi/reader/base.py
# class AbstractReader(object):
#     maxMibSize = 10000000  # MIBs can't be that large
#     fuzzyMatching = True  # try different file names while searching for MIB
#     originalMatching = uppercaseMatching = lowcaseMatching = True
#     exts = ['',
#             os.path.extsep + 'txt',
#             os.path.extsep + 'mib',
#             os.path.extsep + 'my']
#     exts.extend([x.upper() for x in exts if x])
# 
#     def setOptions(self, **kwargs):
#         for k in kwargs:
#             setattr(self, k, kwargs[k])
#         return self
# 
#     def getMibVariants(self, mibname, **options):
#         filenames = []
# 
#         if self.originalMatching:
#             filenames.append(mibname)
# 
#         if self.uppercaseMatching:
#             filenames.append(mibname.upper())
# 
#         if self.lowcaseMatching:
#             filenames.append(mibname.lower())
# 
#         if self.fuzzyMatching:
#             part = filenames[-1].find('-mib')
#             if part != -1:
#                 filenames.extend(
#                     [x[:part] for x in filenames]
#                 )
#             else:
#                 suffixed = mibname + '-mib'
#                 filenames.append(suffixed.upper())
#                 filenames.append(suffixed.lower())
# 
#         return ((x, x + y) for x in filenames
#                 for y in options.get('exts', self.exts))
# 
#     def getData(self, filename, **options):
#         raise NotImplementedError()
# 
# Path: pysmi/mibinfo.py
# class MibInfo(object):
#     #: actual MIB name
#     name = ''
# 
#     #: possible alternative to MIB name
#     alias = ''
# 
#     #: URL to MIB file
#     path = ''
# 
#     #: MIB file name
#     file = ''
# 
#     #: MIB file modification time
#     mtime = 0
# 
#     #: module OID
#     oid = ''
# 
#     #: MIB revision as `datetime`
#     revision = None
# 
#     #: all OIDs defined in this module
#     oids = ()
# 
#     #: MODULE-IDENTITY OID
#     identity = ''
# 
#     #: Enterprise OID
#     enterprise = ()
# 
#     #: MODULE-COMPLIANCE OIDs
#     compliance = ()
# 
#     #: imported MIB names
#     imported = ()
# 
#     def __init__(self, **kwargs):
#         for k in kwargs:
#             setattr(self, k, kwargs[k])
# 
# Path: pysmi/compat.py
# def decode(s):
#     if isinstance(s, bytes):
#         s = s.decode('utf-8', 'ignore')
#     return s
# 
# Path: pysmi/debug.py
# class Printer(object):
#     class NullHandler(logging.Handler):
# class Debug(object):
#     def __init__(self, logger=None, handler=None, formatter=None):
#     def __call__(self, msg):
#     def __str__(self):
#     def getCurrentLogger(self):
#         def emit(self, record):
#     def __init__(self, *flags, **options):
#     def __str__(self):
#     def __call__(self, msg):
#     def __and__(self, flag):
#     def __rand__(self, flag):
#     def getCurrentPrinter(self):
#     def getCurrentLogger(self):
# def setLogger(l):
# 
# Path: pysmi/error.py
# class PySmiError(Exception):
# class PySmiLexerError(PySmiError):
# class PySmiParserError(PySmiLexerError):
# class PySmiSyntaxError(PySmiParserError):
# class PySmiSearcherError(PySmiError):
# class PySmiFileNotModifiedError(PySmiSearcherError):
# class PySmiFileNotFoundError(PySmiSearcherError):
# class PySmiReaderError(PySmiError):
# class PySmiReaderFileNotModifiedError(PySmiReaderError):
# class PySmiReaderFileNotFoundError(PySmiReaderError):
# class PySmiCodegenError(PySmiError):
# class PySmiSemanticError(PySmiCodegenError):
# class PySmiWriterError(PySmiError):
#     def __init__(self, *args, **kwargs):
#     def __repr__(self):
#     def __str__(self):
#     def __str__(self):


# Path: pysmi/reader/zipreader.py
import os
import sys
import time
import datetime
import zipfile
from pysmi.reader.base import AbstractReader
from pysmi.mibinfo import MibInfo
from pysmi.compat import decode
from pysmi import debug
from pysmi import error


        return dataObj, mtime

    def __str__(self):
        return '%s{"%s"}' % (self.__class__.__name__, self._name)

    def getData(self, mibname, **options):
        debug.logger & debug.flagReader and debug.logger('looking for MIB %s at %s' % (mibname, self._name))

        if self._pendingError:
            raise self._pendingError

        if not self._members:
            raise error.PySmiReaderFileNotFoundError('source MIB %s not found' % mibname, reader=self)

        for mibalias, mibfile in self.getMibVariants(mibname, **options):

            debug.logger & debug.flagReader and debug.logger('trying MIB %s' % mibfile)

            try:
                refs = self._members[mibfile]

            except KeyError:
                continue

            mibData, mtime = self._readZipFile(refs)

            if not mibData:
                continue


            debug.logger & debug.flagReader and debug.logger(