Angelo Gladding
lahacker.net

dlv5vbq7lzlthol5 4b942a3185b37d00

angelo@lahacker.net

South Pasadena, California, United States currently feels like 85.51°F

Home CodewebCommits

Bringing all to date

by Angelo Gladding 09CEF88F29CC1A44

Changed Files

--- a/web/__init__.py

+++ b/web/__init__.py

 import lxml import lxml.html import mm+from mm import Template import pendulum import pyvirtualdisplay import selenium
  from . import headers from . import letsencrypt-from .newmath import nbencode, nbrandom, nb60_re+from .newmath import nbencode, nbdecode, nbrandom, nb60_re from .response import (Status,  # noqa                        OK, Created, Accepted, NoContent, MultiStatus,                        Found, SeeOther, PermanentRedirect,
  __all__ = ["application", "serve", "anti_csrf", "form", "secure_form",            "get_nonce", "get_token", "best_match", "sessions", "require_auth",-           "tx", "templates", "uri", "kv", "header", "Application"]+           "tx", "templates", "uri", "kv", "header", "Application",+           "nbencode", "nbdecode", "Template"]   kvdb = kv.db("web", ":", {"auth:secret": "string",
     response = Response()     log = Log() +    @property+    def origin(self):+        return self.host.origin++    @property+    def owner(self):+        return self.host.owner++    @property+    def db(self):+        return self.host.db++    @property+    def kv(self):+        return self.host.kv++    @property+    def view(self):+        return self.host.view+  tx = Transaction() 
             data = json.loads(str(data))         else:             data = Session(defaults)+        # XXX print(identifier, data)         tx.user.session = data         tx.user.identifier = identifier         yield
         # FIXME kvdb.delete("data")         # FIXME if user.session:         # FIXME     kvdb.hmset("data", **user.session)+        # XXX print(identifier, data, tx.user.identifier, tx.user.session)         tx.response.headers["set-cookie"] = (("session", tx.user.identifier),)         # ("Domain", tx.host.name))     return hook
             self.browser.quit()         except selenium.common.exceptions.WebDriverException:             pass-        displays[0].stop()+        if displays:+            try:+                displays[0].stop()+            except KeyError:  # raising during multi-user testing+                pass      def __getattr__(self, attr):         return getattr(self.browser, attr)