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

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

Issue 15009006: Docserver: refactor Servlet, ObjectStore, and ServerInstance architecture to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cduvall, redirect fix 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
Index: chrome/common/extensions/docs/server2/example_zipper.py
diff --git a/chrome/common/extensions/docs/server2/example_zipper.py b/chrome/common/extensions/docs/server2/example_zipper.py
index 061aee5ceeb011bee8f6643114c95dccc077a887..f6160cd9a1a414a0fe5054edb9c692ba54622ab1 100644
--- a/chrome/common/extensions/docs/server2/example_zipper.py
+++ b/chrome/common/extensions/docs/server2/example_zipper.py
@@ -10,12 +10,10 @@ from zipfile import ZipFile
import compiled_file_system as compiled_fs
class ExampleZipper(object):
- """This class creates a zip file given a samples directory.
- """
+ '''This class creates a zip file given a samples directory.
+ '''
def __init__(self, compiled_fs_factory, base_path):
self._base_path = base_path.rstrip('/')
- # Use an IdentityFileSystem here so that it shares a cache with the samples
- # data source. Otherwise we'd need to fetch the zip files from the cron job.
self._file_cache = compiled_fs_factory.CreateIdentity(ExampleZipper)
self._zip_cache = compiled_fs_factory.Create(self._MakeZipFile,
ExampleZipper)
@@ -42,9 +40,9 @@ class ExampleZipper(object):
return zip_bytes.getvalue()
def Create(self, path):
- """ Creates a new zip file from the recursive contents of |path|
+ ''' Creates a new zip file from the recursive contents of |path|
as returned by |_zip_cache|.
Paths within the zip file are given relative to and including |path|.
- """
+ '''
return self._zip_cache.GetFromFileListing(
'%s/%s' % (self._base_path, path.strip('/')))

Powered by Google App Engine
This is Rietveld 408576698