diff --git a/osc/util/cpio.py b/osc/util/cpio.py index 4a97cf5a..021a5d2e 100644 --- a/osc/util/cpio.py +++ b/osc/util/cpio.py @@ -147,16 +147,6 @@ class CpioRead: def read(self): if not self.__file: self.__file = open(self.filename, 'rb') - try: - if sys.platform[:3] != 'win': - self.__file = mmap.mmap(self.__file.fileno(), os.path.getsize(self.__file.name), prot = mmap.PROT_READ) - else: - self.__file = mmap.mmap(self.__file.fileno(), os.path.getsize(self.__file.name)) - except EnvironmentError as e: - if e.errno == 19 or ( hasattr(e, 'winerror') and e.winerror == 5 ): - print('cannot use mmap to read the file, failing back to default', file=sys.stderr) - else: - raise e else: self.__file.seek(0, os.SEEK_SET) self._init_datastructs()