From 158bc83a148cced88654efc8e64edb6aa07b596b Mon Sep 17 00:00:00 2001 From: gryf Date: Fri, 20 Oct 2023 18:37:43 +0200 Subject: [PATCH] Clean up code. --- ulzx | 62 +++++++++++++++++++++++++++--------------------------------- 1 file changed, 28 insertions(+), 34 deletions(-) diff --git a/ulzx b/ulzx index b90f0f3..29f1b45 100755 --- a/ulzx +++ b/ulzx @@ -3,32 +3,33 @@ Read only, Amiga LZX[1] archiver Virtual filesystem executive for Midnight Commander. -Tested against python 3.6, unlzx[1] 1.1 and mc 4.8.22 +Tested against python 3.8, unlzx[1] 1.1 and mc 4.8.22 [1] ftp://us.aminet.net/pub/aminet/misc/unix/unlzx.c.gz.readme Changelog: + 1.3 Code cleanup 1.2 Use python3 1.1 Moved common code into extfslib library 1.0 Initial release Author: Roman 'gryf' Dobosz -Date: 2019-06-30 +Date: 2023-10-20 Version: 1.2 Licence: BSD """ import os -import sys import re import shutil -from subprocess import call, CalledProcessError -from tempfile import mkdtemp, mkstemp +import subprocess +import sys +import tempfile -from extfslib import Archive, parse_args +import extfslib -class ULzx(Archive): - """Archive handle. Provides interface to MC's extfs subsystem""" +class ULzx(extfslib.Archive): + """LZX archive handle. Provides interface to MC's extfs subsystem""" LINE_PAT = re.compile(b"^\s+(?P\d+)\s+" b"((n/a)|\d+)\s" b"(?P