Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3360)

Unified Diff: chrome/common/extensions/docs/server2/caching_rietveld_patcher.py

Issue 14883011: Switch from {...} to dict((...)) generator syntax. The former doesn't work in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/extensions/docs/server2/patched_file_system.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/server2/caching_rietveld_patcher.py
diff --git a/chrome/common/extensions/docs/server2/caching_rietveld_patcher.py b/chrome/common/extensions/docs/server2/caching_rietveld_patcher.py
index 98c1924345760e8108d1ee10ea6aa816cc25a2cc..dd49482da2a9cb8d37a3269ddb36b6ddc192088a 100644
--- a/chrome/common/extensions/docs/server2/caching_rietveld_patcher.py
+++ b/chrome/common/extensions/docs/server2/caching_rietveld_patcher.py
@@ -16,11 +16,12 @@ def _MakeKey(path, version):
return '%s@%s' % (path, version)
def _ToObjectStoreValue(raw_value, version):
- return {_MakeKey(key, version): raw_value[key] for key in raw_value}
+ return dict((_MakeKey(key, version), raw_value[key])
+ for key in raw_value)
def _FromObjectStoreValue(raw_value, binary):
- return {key[0:key.rfind('@')]: _HandleBinary(raw_value[key], binary)
- for key in raw_value}
+ return dict((key[0:key.rfind('@')], _HandleBinary(raw_value[key], binary))
+ for key in raw_value)
def _HandleBinary(data, binary):
return data if binary else ToUnicode(data)
« no previous file with comments | « no previous file | chrome/common/extensions/docs/server2/patched_file_system.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698