[game-data-packager] 05/19: insist that YAML contains the packages stanza
Simon McVittie
smcv at debian.org
Tue Jan 13 11:34:37 UTC 2015
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository game-data-packager.
commit f4d4010cc4c9fbaca3425dbe3e9d24d15194dad8
Author: Simon McVittie <smcv at debian.org>
Date: Tue Jan 13 09:18:13 2015 +0000
insist that YAML contains the packages stanza
---
lib/game_data_packager/__init__.py | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/lib/game_data_packager/__init__.py b/lib/game_data_packager/__init__.py
index 6667e20..9df36d8 100644
--- a/lib/game_data_packager/__init__.py
+++ b/lib/game_data_packager/__init__.py
@@ -408,17 +408,18 @@ class GameData(object):
self._populate_package(next(iter(self.packages.values())),
self.yaml)
- if 'packages' in self.yaml:
- for binary, data in self.yaml['packages'].items():
- # these should only be at top level, since they are global
- assert 'cksums' not in data, binary
- assert 'md5sums' not in data, binary
- assert 'sha1sums' not in data, binary
- assert 'sha256sums' not in data, binary
-
- package = self.construct_package(binary)
- self.packages[binary] = package
- self._populate_package(package, data)
+ assert 'packages' in self.yaml
+
+ for binary, data in self.yaml['packages'].items():
+ # these should only be at top level, since they are global
+ assert 'cksums' not in data, binary
+ assert 'md5sums' not in data, binary
+ assert 'sha1sums' not in data, binary
+ assert 'sha256sums' not in data, binary
+
+ package = self.construct_package(binary)
+ self.packages[binary] = package
+ self._populate_package(package, data)
if 'cksums' in self.yaml:
for line in self.yaml['cksums'].splitlines():
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git
More information about the Pkg-games-commits
mailing list