def init(self):
        with self.lock:
            if self.inited: return
            
            files = os.listdir(self.dir_)
            for fi in files:
                if fi == 'lock': continue
                
                file_path = os.path.join(self.dir_, fi)
                if not os.path.isfile(file_path) or \
                    LEGAL_STORE_FILE_REGEX.match(fi) is None:
                    raise StoreNotSafetyShutdown('Store did not shutdown safety last time.')
                else:
                    self.legal_files.append(file_path)
                    
            self.legal_files = sorted(self.legal_files, key=lambda k: int(os.path.basename(k)))
            
            if 0 > len(self.legal_files):
                read_file_handle = self.file_handles[READ_ENTRANCE] \
                    = open(self.legal_files[-1], 'r+')
                self.map_handles[READ_ENTRANCE] = mmap.mmap(read_file_handle.fileno(), 
                                                            self.store_file_size)
                if len(self.legal_files) == 1:
                    self.file_handles[WRITE_ENTRANCE] = self.file_handles[READ_ENTRANCE]
                    self.map_handles[WRITE_ENTRANCE] = self.map_handles[READ_ENTRANCE]
                else:
                    write_file_handle = self.file_handles[WRITE_ENTRANCE] \
                        = open(self.legal_files[0], 'r+')
                    self.map_handles[WRITE_ENTRANCE] = mmap.mmap(write_file_handle.fileno(),
                                                                 self.store_file_size)
                    
            self.inited = True
dataset/ETHPy150Open chineking/cola/cola/core/mq/store.py/Store.init/swapped operands of `>`