MCPcopy
hub / github.com/PokemonGoF/PokemonGo-Bot / _json_loader

Function _json_loader

pokecli.py:370–381  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

368 load = {}
369
370 def _json_loader(filename):
371 try:
372 with open(filename, 'rb') as data:
373 load.update(json.load(data))
374 except ValueError:
375 if jsonlint:
376 with open(filename, 'rb') as data:
377 lint = jsonlint()
378 rc = lint.main(['-v', filename])
379
380 logger.critical('Error with configuration file')
381 sys.exit(-1)
382
383 # Select a config file code
384 parser.add_argument("-cf", "--config", help="Config File to use")

Callers 1

init_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected