Skip to content

Commit

Permalink
Update to v1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
HubTou committed Mar 6, 2022
1 parent 015cdc6 commit 881b03b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = pnu_libmanconf
description = library for handling man(1) and manpath(1) configuration files
long_description = file: README.md
long_description_content_type = text/markdown
version = 1.1.1
version = 1.1.2
license = BSD 3-Clause License
license_files = License
author = Hubert Tournier
Expand Down
15 changes: 7 additions & 8 deletions src/libmanconf/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import libpnu

# Version string used by the what(1) and ident(1) commands:
ID = "@(#) $Id: libmanconf - library for handling man(1) and manpath(1) configuration files v1.1.1 (March 6, 2022) by Hubert Tournier $"
ID = "@(#) $Id: libmanconf - library for handling man(1) and manpath(1) configuration files v1.1.2 (March 6, 2022) by Hubert Tournier $"


################################################################################
Expand All @@ -30,20 +30,20 @@ def _read_configuration_file(filename, debug_level, manpath_so_far):
line = line.strip()

if debug_level > 1:
print("-- %s" % line, file=sys.stderr)
print("-- %s" % line, file=sys.stderr)

if line:
parts = line.split()

if parts[0] == "MANCONFIG":
if debug_level > 2:
print("-- MANCONFIG", file=sys.stderr)
print("-- MANCONFIG", file=sys.stderr)
if len(parts) == 2:
config = parts[1]

elif parts[0] == "MANPATH":
if debug_level > 2:
print("-- MANPATH", file=sys.stderr)
print("-- MANPATH", file=sys.stderr)
if len(parts) == 2:
if os.path.isdir(parts[1]):
if parts[1] in manpath_so_far.split(os.pathsep):
Expand All @@ -63,7 +63,7 @@ def _read_configuration_file(filename, debug_level, manpath_so_far):

elif parts[0] == "MANLOCALE":
if debug_level > 2:
print("-- MANLOCALE", file=sys.stderr)
print("-- MANLOCALE", file=sys.stderr)
if len(parts) == 2:
if locales:
locales += os.pathsep + parts[1]
Expand All @@ -80,12 +80,11 @@ def _read_configuration_file(filename, debug_level, manpath_so_far):
if len(parts) >= 2:
processors.append(parts[0] + "=" + " ".join(line.split()[1:]))
if debug_level > 2:
print(parts[0])
print("-- Parsed %s" % parts[0], file=sys.stderr)
print("-- Parsed %s" % parts[0], file=sys.stderr)

elif line.startswith("#"):
if debug_level > 2:
print("-- Comment", file=sys.stderr)
print("-- Comment", file=sys.stderr)

return config, paths, locales, processors

Expand Down

0 comments on commit 881b03b

Please sign in to comment.