use ContentManagers own is_hidden() function

This commit is contained in:
Manuel Riel 2014-10-06 20:46:24 +02:00
parent 28d4444def
commit fc59a1b927

View File

@ -22,7 +22,6 @@ try:
except ImportError:
app_log = logging.getLogger()
from IPython.html.utils import is_hidden
from IPython.html.base.handlers import IPythonHandler
class FilesHandler(IPythonHandler):
@ -32,7 +31,7 @@ class FilesHandler(IPythonHandler):
def get(self, path):
cm = self.settings['contents_manager']
abs_path = os.path.join(cm.root_dir, path)
if is_hidden(abs_path):
if cm.is_hidden(abs_path):
self.log.info("Refusing to serve hidden file, via 404 Error")
raise web.HTTPError(404)