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. 7
      py-i2phosts-checker

7
py-i2phosts-checker

@ -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…
Cancel
Save