| OLD | NEW |
| 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 Loading... |
| 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) |
| OLD | NEW |