Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: dolda2000/wrw
base: 7bcaef26c5
...
head fork: dolda2000/wrw
compare: 3414365c20
  • 4 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
View
2  wrw/session.py
@@ -19,7 +19,7 @@ class session(object):
def __init__(self, expire = 86400 * 7):
self.id = hexencode(gennonce(16))
self.dict = {}
- self.lock = threading.Lock()
+ self.lock = threading.RLock()
self.ctime = self.atime = self.mtime = int(time.time())
self.expire = expire
self.dctl = set()
View
4 wrw/sp/cons.py
@@ -9,6 +9,10 @@ class text(node, str):
def __todom__(self, doc):
return doc.createTextNode(self)
+class raw(node, str):
+ def __todom__(self, doc):
+ raise Exception("Cannot convert raw code to DOM objects")
+
class element(node):
def __init__(self, ns, name, ctx):
self.ns = ns
View
5 wrw/sp/util.py
@@ -44,6 +44,9 @@ def quotewrite(self, buf):
def text(self, el):
self.quotewrite(el)
+ def rawcode(self, el):
+ self.write(el)
+
def attrval(self, buf):
qc, qt = ("'", "'") if '"' in buf else ('"', """)
self.write(qc)
@@ -112,6 +115,8 @@ def node(self, el):
self.element(el)
elif isinstance(el, cons.text):
self.text(el)
+ elif isinstance(el, cons.raw):
+ self.rawcode(el)
else:
raise Exception("Unknown object in element tree: " + el)
View
2  wrw/util.py
@@ -53,7 +53,7 @@ def get(cls, req, create = True):
except KeyError:
if not create:
return None
- ret = cls(req)
+ ret = cls(req, sess)
sess[cls] = ret
return ret

No commit comments for this range

Something went wrong with that request. Please try again.