Chromium Code Reviews| Index: chrome/common/extensions/docs/server2/local_fetcher.py |
| diff --git a/chrome/common/extensions/docs/server2/local_fetcher.py b/chrome/common/extensions/docs/server2/local_fetcher.py |
| index 7d80170c21d042c182998537a630d4545422c229..98d03e8b36011c64b87a7a69e65d283941e90c81 100644 |
| --- a/chrome/common/extensions/docs/server2/local_fetcher.py |
| +++ b/chrome/common/extensions/docs/server2/local_fetcher.py |
| @@ -9,7 +9,7 @@ class LocalFetcher(object): |
| """Class to fetch resources from local filesystem. |
| """ |
| def __init__(self, base_path): |
| - self.base_path = base_path |
| + self._base_path = os.path.join(*base_path.split('/')) |
|
not at google - send to devlin
2012/06/07 04:43:57
Could you combine this and the stuff on line 24 in
cduvall
2012/06/08 00:39:23
Done.
|
| class _Resource(object): |
| def __init__(self): |
| @@ -20,9 +20,9 @@ class LocalFetcher(object): |
| with open(filename, 'r') as f: |
| return f.read() |
| - def FetchResource(self, branch, path): |
| + def FetchResource(self, path): |
| real_path = os.path.join(*path.split('/')) |
| result = self._Resource() |
| - logging.info('Reading: ' + os.path.join(self.base_path, real_path)) |
| - result.content = self._ReadFile(os.path.join(self.base_path, real_path)) |
| + logging.info('Reading: ' + os.path.join(self._base_path, real_path)) |
| + result.content = self._ReadFile(os.path.join(self._base_path, real_path)) |
|
not at google - send to devlin
2012/06/07 04:43:57
Just pass content through to Resource in __init__
cduvall
2012/06/08 00:39:23
Done.
|
| return result |