def __init__(self, logname, config):
        self.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'))
                # NOTE(jhesketh): While _get_siwft_connection seems like it
                # should be part of this class we actually still need it
                # outside to maintain the connection across multiple objects.
                # Each SwiftIterableBuffer is a new object request, not
                # necessarily a new swift connection (hopefully we can reuse
                # connections). I think the place to put the get connection
                # in the future would be in the server.py (todo).
                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:
                # Only print the traceback if the error was anything but a
                # 404. File not found errors are handled separately.
                if 'http_status' not in dir(e) and 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__/operator `or` -> `and`