diff options
author | Ben Brown <ben.brown@codethink.co.uk> | 2020-08-03 13:31:05 +0000 |
---|---|---|
committer | Ben Brown <ben.brown@codethink.co.uk> | 2020-08-03 13:31:05 +0000 |
commit | ccb96f728b11bf3f7c14b9752286e679d850d92f (patch) | |
tree | 7dac03902bdc6955b93d751370c72ce325f5a81c | |
parent | ab010fb032b7f75212140ecb7b31e1a96f50a621 (diff) | |
parent | c559d2cf562c7fdf5939a4a67a334a7d1882088c (diff) | |
download | lorry-controller-ccb96f728b11bf3f7c14b9752286e679d850d92f.tar.gz |
Merge branch 'robjh/debug-yaml-error' into 'master'
Rewind lorry FDs before parsing as JSON.
See merge request CodethinkLabs/lorry/lorry-controller!21
-rw-r--r-- | lorrycontroller/readconf.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lorrycontroller/readconf.py b/lorrycontroller/readconf.py index 81b00f9..23dfff1 100644 --- a/lorrycontroller/readconf.py +++ b/lorrycontroller/readconf.py @@ -242,6 +242,7 @@ class ReadConfiguration(lorrycontroller.LorryControllerRoute): try: obj = yaml.safe_load(f) except yaml.YAMLError: + f.seek(0) obj = json.load(f) except ValueError as e: logging.error('YAML and JSON problem in %s', filename) |