Browse Source

py-i2phosts-checker: include another config only if "include" is present

pull/1/head
Hidden Z 14 years ago
parent
commit
fd380a2d4a
  1. 3
      py-i2phosts-checker

3
py-i2phosts-checker

@ -23,7 +23,8 @@ parser.add_argument('-c', '--config', default='/etc/py-i2phosts/checker.conf', d @@ -23,7 +23,8 @@ parser.add_argument('-c', '--config', default='/etc/py-i2phosts/checker.conf', d
args = parser.parse_args()
# read config
config = configobj.ConfigObj(args.config_file, file_error=True)
config = configobj.ConfigObj(args.config_file)
if 'include' in config:
config_included = configobj.ConfigObj(config['include'])
config.merge(config_included)

Loading…
Cancel
Save