freebsd-ports/textproc/ecromedos/files/patch-lib_ecmds_configreader.py
Nicola Vitale c11ba9d2c1 - Update to 2.1.0
- Add LICENSE (GPLv2)
- Restrict Python version to 2
- Sort variables and their values
- Remove files/patch-etc-ecmds.conf
- Add patch/patch-lib_ecmds_configreader.py
- Remove Author: line and fix blank after
  WWW: in pkg-descr
- Use @sample macro in pkg-plist
2015-02-16 21:16:34 +00:00

24 lines
926 B
Python

--- lib/ecmds/configreader.py.orig 2012-01-12 21:43:00 UTC
+++ lib/ecmds/configreader.py
@@ -113,9 +113,7 @@ class ECMDSCfgFileReader:
try:
cfile = os.path.normpath(options['config_file'])
except KeyError:
- syspath = os.path.normpath(sys.path[0])
- cfile = os.sep.join(["..", "etc", "ecmds.conf"])
- cfile = os.path.join(syspath, cfile)
+ cfile = "%%ETCDIR%%/ecmds.conf"
if not os.path.isfile(cfile):
msg = "Please specify the location of the config file."
raise ECMDSError(msg)
@@ -189,9 +187,7 @@ class ECMDSPluginsMapReader:
try:
pmap = os.path.normpath(config['plugins_map'])
except KeyError:
- syspath = os.path.normpath(sys.path[0])
- pmap = os.sep.join(["..", "etc", "plugins.conf"])
- pmap = os.path.join(syspath, pmap)
+ pmap = "%%ETCDIR%%/plugins.conf"
if not os.path.isfile(pmap):
msg = "Warning: plugins map not found."
sys.stderr.write(msg + "\n")