

def __init__(self, logname, config):
    logname.logname = logname
    self.resp_headers = {
        
    }
    self.obj = None
    self.file_headers = {
        
    }
    self.file_headers['filename'] = logname
    if (not config.has_section('swift')):
        sys.stderr.write('Not configured to use swift..\n')
        sys.stderr.write(('logname: %s\n' % logname))
    else:
        try:
            swift_config = dict(config.items('swift'))
            con = _get_swift_connection(swift_config)
            chunk_size = int(swift_config.get('chunk_size', 64))
            if (chunk_size < 1):
                chunk_size = None
            (self.resp_headers, self.obj) = con.get_object(swift_config['container'], logname, resp_chunk_size=chunk_size)
            self.file_headers.update(self.resp_headers)
        except Exception as e:
            if (('http_status' not in dir(e)) or (e.http_status != 404)):
                import traceback
                sys.stderr.write('Error fetching from swift.\n')
                sys.stderr.write(('logname: %s\n' % logname))
                traceback.print_exc()

dataset/ETHPy150Open openstack-infra/os-loganalyze/os_loganalyze/generator.py SwiftIterableBuffer.__init__/VarMisuse@14/17 `self`->`logname`