diff --git a/py25/bacpypes/consolelogging.py b/py25/bacpypes/consolelogging.py index 0d7e48f..f6bbda5 100755 --- a/py25/bacpypes/consolelogging.py +++ b/py25/bacpypes/consolelogging.py @@ -25,6 +25,7 @@ _debug = 0 _log = ModuleLogger(globals()) # configuration +BACPYPES_INI = os.getenv('BACPYPES_INI', 'BACpypes.ini') BACPYPES_DEBUG = os.getenv('BACPYPES_DEBUG', '') BACPYPES_COLOR = os.getenv('BACPYPES_COLOR', None) BACPYPES_MAXBYTES = int(os.getenv('BACPYPES_MAXBYTES', 1048576)) @@ -209,7 +210,7 @@ class ConfigArgumentParser(ArgumentParser): # add a way to read a configuration file self.add_argument('--ini', help="device object configuration file", - default="BACpypes.ini", + default=BACPYPES_INI, ) def parse_args(self, *args, **kwargs): diff --git a/py27/bacpypes/consolelogging.py b/py27/bacpypes/consolelogging.py index d6633ef..93fc3f4 100755 --- a/py27/bacpypes/consolelogging.py +++ b/py27/bacpypes/consolelogging.py @@ -19,6 +19,7 @@ _debug = 0 _log = ModuleLogger(globals()) # configuration +BACPYPES_INI = os.getenv('BACPYPES_INI', 'BACpypes.ini') BACPYPES_DEBUG = os.getenv('BACPYPES_DEBUG', '') BACPYPES_COLOR = os.getenv('BACPYPES_COLOR', None) BACPYPES_MAXBYTES = int(os.getenv('BACPYPES_MAXBYTES', 1048576)) @@ -199,7 +200,7 @@ class ConfigArgumentParser(ArgumentParser): # add a way to read a configuration file self.add_argument('--ini', help="device object configuration file", - default="BACpypes.ini", + default=BACPYPES_INI, ) def parse_args(self, *args, **kwargs): diff --git a/py34/bacpypes/consolelogging.py b/py34/bacpypes/consolelogging.py index d1deffe..4deae56 100755 --- a/py34/bacpypes/consolelogging.py +++ b/py34/bacpypes/consolelogging.py @@ -19,6 +19,7 @@ _debug = 0 _log = ModuleLogger(globals()) # configuration +BACPYPES_INI = os.getenv('BACPYPES_INI', 'BACpypes.ini') BACPYPES_DEBUG = os.getenv('BACPYPES_DEBUG', '') BACPYPES_COLOR = os.getenv('BACPYPES_COLOR', None) BACPYPES_MAXBYTES = int(os.getenv('BACPYPES_MAXBYTES', 1048576)) @@ -199,7 +200,7 @@ class ConfigArgumentParser(ArgumentParser): # add a way to read a configuration file self.add_argument('--ini', help="device object configuration file", - default="BACpypes.ini", + default=BACPYPES_INI, ) def parse_args(self, *args, **kwargs):