mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-08-26 21:52:40 +00:00
py-i2phosts-checker: include another config only if "include" is present
This commit is contained in:
parent
d3cc2e6b83
commit
fd380a2d4a
@ -23,9 +23,10 @@ parser.add_argument('-c', '--config', default='/etc/py-i2phosts/checker.conf', d
|
|||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
# read config
|
# read config
|
||||||
config = configobj.ConfigObj(args.config_file, file_error=True)
|
config = configobj.ConfigObj(args.config_file)
|
||||||
config_included = configobj.ConfigObj(config['include'])
|
if 'include' in config:
|
||||||
config.merge(config_included)
|
config_included = configobj.ConfigObj(config['include'])
|
||||||
|
config.merge(config_included)
|
||||||
|
|
||||||
# django setup
|
# django setup
|
||||||
DJANGO_SETTINGS_MODULE = 'settings'
|
DJANGO_SETTINGS_MODULE = 'settings'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user