Commit d460c08c authored by Peter V. Saveliev's avatar Peter V. Saveliev

cli: builtins

parent 450739b1
......@@ -80,6 +80,9 @@ class Console(code.InteractiveConsole):
try:
indent = self.session.handle(text, indent)
except SystemExit:
self.close()
return
except:
self.showtraceback()
continue
......
......@@ -75,7 +75,9 @@ class Handler(BaseHTTPRequestHandler):
else:
ndb = self.server.ndb
session = Session(ndb=ndb, stdout=ProxyEncoder(self.wfile))
session = Session(ndb=ndb,
stdout=ProxyEncoder(self.wfile),
builtins=('ls', '.', '..', 'version'))
self.send_response(200)
self.end_headers()
for cmd in request['commands']:
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment