| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 from file_system import FileSystem, FileNotFoundError, StatInfo, ToUnicode | 5 from file_system import FileSystem, FileNotFoundError, StatInfo, ToUnicode |
| 6 from future import Future | 6 from future import Future |
| 7 import logging | 7 import logging |
| 8 import re | 8 import re |
| 9 import xml.dom.minidom as xml | 9 import xml.dom.minidom as xml |
| 10 from xml.parsers.expat import ExpatError | 10 from xml.parsers.expat import ExpatError |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 if result.status_code == 404: | 127 if result.status_code == 404: |
| 128 raise FileNotFoundError(path) | 128 raise FileNotFoundError(path) |
| 129 stat_info = self._CreateStatInfo(result.content) | 129 stat_info = self._CreateStatInfo(result.content) |
| 130 if not path.endswith('/'): | 130 if not path.endswith('/'): |
| 131 filename = path.rsplit('/', 1)[-1] | 131 filename = path.rsplit('/', 1)[-1] |
| 132 if filename not in stat_info.child_versions: | 132 if filename not in stat_info.child_versions: |
| 133 raise FileNotFoundError(path) | 133 raise FileNotFoundError(path) |
| 134 stat_info.version = stat_info.child_versions[filename] | 134 stat_info.version = stat_info.child_versions[filename] |
| 135 return stat_info | 135 return stat_info |
| 136 | 136 |
| 137 def GetVersion(self): | 137 @classmethod |
| 138 def GetVersion(cls): |
| 138 return _VERSION | 139 return _VERSION |
| OLD | NEW |