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

Side by Side Diff: chrome/common/extensions/docs/server2/new_github_file_system.py

Issue 26538009: Docserver: make file_system a property of Create (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: niggles Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import json 5 import json
6 import logging 6 import logging
7 from cStringIO import StringIO 7 from cStringIO import StringIO
8 import sys 8 import sys
9 from zipfile import BadZipfile, ZipFile 9 from zipfile import BadZipfile, ZipFile
10 10
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 child_paths = {} 197 child_paths = {}
198 if path.endswith('/'): 198 if path.endswith('/'):
199 # Deal with a directory 199 # Deal with a directory
200 for f in filter(lambda s: s.startswith(path), trimmed): 200 for f in filter(lambda s: s.startswith(path), trimmed):
201 filename = f[len(path):] 201 filename = f[len(path):]
202 if not '/' in filename and not f == path: 202 if not '/' in filename and not f == path:
203 child_paths[filename] = StatInfo(version) 203 child_paths[filename] = StatInfo(version)
204 204
205 return StatInfo(version, child_paths or None) 205 return StatInfo(version, child_paths or None)
206 206
207 def GetDebugString(self):
208 return ' %s: %s' % (self._repo_key, self._repo_url)
209
210 def GetIdentity(self): 207 def GetIdentity(self):
211 return '%s' % StringIdentity(self.__class__.__name__ + self._repo_key) 208 return '%s' % StringIdentity(self.__class__.__name__ + self._repo_key)
209
210 def __repr__(self):
211 return '<%s: key=%s, url=%s>' % (type(self).__name__,
212 self._repo_key,
213 self._repo_url)
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/server2/intro_data_source.py ('k') | chrome/common/extensions/docs/server2/patch_servlet.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698