X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fchrome%2Fcommon%2Fextensions%2Fdocs%2Fserver2%2Fcompiled_file_system.py;h=fc4b1fd9dcf6bde116f45a7f6b91b3f951869047;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=ee86e615e825c9ea6e46ff5d1750c2bce7923efb;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/chrome/common/extensions/docs/server2/compiled_file_system.py b/src/chrome/common/extensions/docs/server2/compiled_file_system.py index ee86e61..fc4b1fd 100644 --- a/src/chrome/common/extensions/docs/server2/compiled_file_system.py +++ b/src/chrome/common/extensions/docs/server2/compiled_file_system.py @@ -8,6 +8,7 @@ import schema_util from docs_server_utils import ToUnicode from file_system import FileNotFoundError from future import Gettable, Future +from path_util import AssertIsDirectory, AssertIsFile from third_party.handlebar import Handlebar from third_party.json_schema_compiler import json_parse from third_party.json_schema_compiler.memoize import memoize @@ -205,6 +206,8 @@ class CompiledFileSystem(object): apply for the first time the file is fetched; if already cached, |binary| will be ignored. ''' + AssertIsFile(path) + try: version = self._file_system.Stat(path).version except FileNotFoundError: @@ -225,8 +228,7 @@ class CompiledFileSystem(object): '''Calls |compilation_function| on the listing of the files at |path|. Assumes that the path given is to a directory. ''' - if not path.endswith('/'): - path += '/' + AssertIsDirectory(path) try: version = self._file_system.Stat(path).version