Corrected couple of typos and missaligements

This commit is contained in:
2023-10-18 21:37:10 +02:00
parent 918a949605
commit b017ac4d5a
2 changed files with 16 additions and 16 deletions

View File

@@ -11,7 +11,7 @@ Midnight Commander extfslib helper library for writing extfs archive plugins.
Description Description
=========== ===========
Extfslib help with building Midnight Commander extf plugins, especially for Extfslib help with building Midnight Commander extfs plugins, especially for
those which operates on different kind of archives. those which operates on different kind of archives.
Simplest plugin built on top of this lib would be: Simplest plugin built on top of this lib would be:
@@ -37,8 +37,8 @@ Simplest plugin built on top of this lib would be:
arch.list() arch.list()
In this example class instance should be able to be called with ``list`` method. In this example class instance should be able to be called with ``list``
All methods: method. All methods:
- ``list`` - ``list``
- ``copyin`` - ``copyin``

View File

@@ -23,13 +23,13 @@ from subprocess import check_output, CalledProcessError
class Archive(object): class Archive(object):
"""Archive handle. Provides interface to MC's extfs subsystem""" """Archive handle. Provides interface to MC's extfs subsystem"""
LINE_PAT = re.compile(b"^(?P<size>)\s" LINE_PAT = re.compile(br"^(?P<size>)\s"
b"(?P<perms>)\s" br"(?P<perms>)\s"
b"(?P<uid>)\s" br"(?P<uid>)\s"
b"(?P<gid>)\s" br"(?P<gid>)\s"
b"(?P<date>)\s+" br"(?P<date>)\s+"
b"(?P<time>)\s" br"(?P<time>)\s"
b"(?P<fpath>)") br"(?P<fpath>)")
ARCHIVER = b"archiver_name" ARCHIVER = b"archiver_name"
CMDS = {"list": b"l", CMDS = {"list": b"l",
"read": b"r", "read": b"r",
@@ -183,13 +183,13 @@ def _parse_args(arch_class):
"written into archive)") "written into archive)")
parser_copyin.set_defaults(func=CALL_MAP['copyin']) parser_copyin.set_defaults(func=CALL_MAP['copyin'])
parser_copyout.add_argument('arch', help="D64 Image filename") parser_copyout.add_argument('arch', help="archive or image filename")
parser_copyout.add_argument('src', help="Source filename (to be read from" parser_copyout.add_argument('src', help="Source filename (to be read from"
" archive") " archive")
parser_copyout.add_argument('dst', help="Destination filename") parser_copyout.add_argument('dst', help="Destination filename")
parser_copyout.set_defaults(func=CALL_MAP['copyout']) parser_copyout.set_defaults(func=CALL_MAP['copyout'])
parser_rm.add_argument('arch', help="D64 Image filename") parser_rm.add_argument('arch', help="archive or image filename")
parser_rm.add_argument('dst', help="File inside archive to be deleted") parser_rm.add_argument('dst', help="File inside archive to be deleted")
parser_rm.set_defaults(func=CALL_MAP['rm']) parser_rm.set_defaults(func=CALL_MAP['rm'])