diff options
author | 2012-03-01 23:23:15 +0100 | |
---|---|---|
committer | 2012-03-01 23:23:15 +0100 | |
commit | 6ce9f197f4681875a2595a5a8d86bd047f993a99 (patch) | |
tree | 0bd35db35b9fe09eccd7262fcc60b4ada5f07e44 /pygithub3/resources/base.py | |
parent | Merge branch 'docs' (diff) | |
download | python-github3-6ce9f197f4681875a2595a5a8d86bd047f993a99.tar.xz python-github3-6ce9f197f4681875a2595a5a8d86bd047f993a99.zip |
Python 2.6 compatibility
Diffstat (limited to 'pygithub3/resources/base.py')
-rw-r--r-- | pygithub3/resources/base.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pygithub3/resources/base.py b/pygithub3/resources/base.py index 255f4c1..4ca2aa3 100644 --- a/pygithub3/resources/base.py +++ b/pygithub3/resources/base.py @@ -73,17 +73,17 @@ class Resource(object): for raw_resource in raw_resources] new_resource = raw_resource.copy() - new_resource.update( - {attr: parse_date(raw_resource[attr]) - for attr in self._dates if attr in raw_resource}) - new_resource.update( - {attr: parse_map(resource, raw_resource[attr]) + new_resource.update(dict([ + (attr, parse_date(raw_resource[attr])) + for attr in self._dates if attr in raw_resource])) + new_resource.update(dict([ + (attr, parse_map(resource, raw_resource[attr])) for attr, resource in self._maps.items() - if attr in raw_resource}) - new_resource.update( - {attr: parse_collection_map(resource, raw_resource[attr]) + if attr in raw_resource])) + new_resource.update(dict([ + (attr, parse_collection_map(resource, raw_resource[attr])) for attr, resource in self._collection_maps.items() - if attr in raw_resource}) + if attr in raw_resource])) return self(new_resource) |