OLD | NEW |
1 # Copyright 2013 The LUCI Authors. All rights reserved. | 1 # Copyright 2013 The LUCI Authors. All rights reserved. |
2 # Use of this source code is governed under the Apache License, Version 2.0 | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
3 # that can be found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
4 | 4 |
5 import functools | 5 import functools |
6 import itertools | 6 import itertools |
7 import os | 7 import os |
8 import sys | |
9 import tempfile | 8 import tempfile |
10 | 9 |
11 from recipe_engine import recipe_api | 10 from recipe_engine import recipe_api |
12 from recipe_engine import config_types | 11 from recipe_engine import config_types |
13 | 12 |
14 | 13 |
15 class Error(Exception): | 14 class Error(Exception): |
16 """Error specific to path recipe module.""" | 15 """Error specific to path recipe module.""" |
17 | 16 |
18 | 17 |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 if name in self.OK_ATTRS: | 295 if name in self.OK_ATTRS: |
297 return getattr(self._path_mod, name) | 296 return getattr(self._path_mod, name) |
298 if name in self.FILTER_METHODS: | 297 if name in self.FILTER_METHODS: |
299 return string_filter(getattr(self._path_mod, name)) | 298 return string_filter(getattr(self._path_mod, name)) |
300 raise AttributeError("'%s' object has no attribute '%s'" % | 299 raise AttributeError("'%s' object has no attribute '%s'" % |
301 (self._path_mod, name)) # pragma: no cover | 300 (self._path_mod, name)) # pragma: no cover |
302 | 301 |
303 def __dir__(self): # pragma: no cover | 302 def __dir__(self): # pragma: no cover |
304 # Used for helping out show_me_the_modules.py | 303 # Used for helping out show_me_the_modules.py |
305 return self.__dict__.keys() + list(self.OK_ATTRS + self.FILTER_METHODS) | 304 return self.__dict__.keys() + list(self.OK_ATTRS + self.FILTER_METHODS) |
OLD | NEW |