diff options
-rwxr-xr-x | lorry | 10 | ||||
-rw-r--r-- | test.lorry | 26 |
2 files changed, 18 insertions, 18 deletions
@@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright (C) 2013-2015 Codethink Limited +# Copyright (C) 2013-2016 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -27,6 +27,8 @@ import shutil import traceback import functools +import yaml + __version__ = '0.0' lorry_path = os.path.realpath(__file__) @@ -107,7 +109,11 @@ class Lorry(cliapp.Application): for arg in args: self.progress('Processing spec file %s' % arg) with open(arg) as f: - specs = json.load(f) + try: + specs = yaml.safe_load(f) + except yaml.YAMLError: + f.seek(0) + specs = json.load(f) for name in sorted(specs.keys()): self.progress('Getting: %s' % name) try: @@ -1,16 +1,10 @@ -{ - "gawk": { - "type": "git", - "url": "git://git.savannah.gnu.org/gawk.git" - }, - "binutils": { - "type": "bzr", - "branches": { - "trunk": "lp:binutils" - } - }, - "bc": { - "type": "tarball", - "url": "http://ftp.gnu.org/gnu/bc/bc-1.06.tar.gz" - } -} +gawk: + type: git + url: git://git.savannah.gnu.org/gawk.git +binutils: + type: bzr + branches: + trunk: lp:binutils +bc: + type: tarball + url: http://ftp.gnu.org/gnu/bc/bc-1.06.tar.gz |