summaryrefslogtreecommitdiff
path: root/subvertpy
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@jelmer.uk>2017-07-16 21:36:54 +0000
committerJelmer Vernooij <jelmer@jelmer.uk>2017-07-16 21:36:54 +0000
commit1211161298769a9cb56e593c23b51842c00888af (patch)
tree3e159f4cca997ed2a244c19b8375d4083514e9c4 /subvertpy
parent754a6d0b4b0c1c02c57c4bc0d1877fcadef8c914 (diff)
Fix literal test.
Diffstat (limited to 'subvertpy')
-rw-r--r--subvertpy/marshall.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/subvertpy/marshall.py b/subvertpy/marshall.py
index 1970da41..6e02b0ce 100644
--- a/subvertpy/marshall.py
+++ b/subvertpy/marshall.py
@@ -17,7 +17,7 @@
"""Marshalling for the svn_ra protocol."""
-class literal:
+class literal(object):
"""A protocol literal."""
def __init__(self, txt):
@@ -29,6 +29,9 @@ class literal:
def __repr__(self):
return self.txt
+ def __eq__(self, other):
+ return (type(self) == type(other) and self.txt == other.txt)
+
# 1. Syntactic structure
# ----------------------
#
@@ -142,6 +145,6 @@ def unmarshall(x):
if not x[0] in whitespace:
raise MarshallError("Expected whitespace, got '%c'" % x[0])
- return (x[1:], ret.decode("ascii"))
+ return (x[1:], literal(ret.decode("ascii")))
else:
raise MarshallError("Unexpected character '%c'" % x[0])