| 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 posixpath | 8 import posixpath |
| 9 import traceback | 9 import traceback |
| 10 from zipfile import ZipFile | 10 from zipfile import ZipFile |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 version = self._stat_cache.Get(self._repo_key).Get() | 278 version = self._stat_cache.Get(self._repo_key).Get() |
| 279 assert version is not None, ('There was a zipball in datastore; there ' | 279 assert version is not None, ('There was a zipball in datastore; there ' |
| 280 'should be a version cached for it') | 280 'should be a version cached for it') |
| 281 | 281 |
| 282 stat_info = StatInfo(version) | 282 stat_info = StatInfo(version) |
| 283 if IsDirectory(path): | 283 if IsDirectory(path): |
| 284 stat_info.child_versions = dict((p, StatInfo(version)) | 284 stat_info.child_versions = dict((p, StatInfo(version)) |
| 285 for p in repo_zip.List(path)) | 285 for p in repo_zip.List(path)) |
| 286 return stat_info | 286 return stat_info |
| 287 | 287 |
| 288 def GetIdentity(self): | 288 def GetStableIdentity(self): |
| 289 return '%s' % StringIdentity(self.__class__.__name__ + self._repo_key) | 289 return '%s' % StringIdentity(self.__class__.__name__ + self._repo_key) |
| 290 | 290 |
| 291 def __repr__(self): | 291 def __repr__(self): |
| 292 return '%s(key=%s, url=%s)' % (type(self).__name__, | 292 return '%s(key=%s, url=%s)' % (type(self).__name__, |
| 293 self._repo_key, | 293 self._repo_key, |
| 294 self._repo_url) | 294 self._repo_url) |
| OLD | NEW |