Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix bugs

  • Loading branch information...
commit 3e3370b9aae0357a0b1d7a6780ef24929711e710 1 parent 38d134c
Sun Ning authored

Showing 2 changed files with 6 additions and 4 deletions. Show diff stats Hide diff stats

  1. +5 3 clj.py
  2. +1 1  setup.py
8 clj.py
@@ -104,7 +104,8 @@ def __read_fd(self, size):
104 104 self.cur_line = self.cur_line + 1
105 105 return c
106 106 else:
107   - return self.fd.read(size)
  107 + cs = self.fd.read(size)
  108 + return cs
108 109
109 110 def __read_token(self):
110 111 c = self.__read_fd(1)
@@ -204,7 +205,7 @@ def __read_token(self):
204 205 r = False
205 206 e = c
206 207
207   - if e is self.terminator:
  208 + if e == self.terminator:
208 209 current_scope, _, container = self.value_stack.pop()
209 210
210 211 if r:
@@ -218,8 +219,9 @@ def __read_token(self):
218 219 v = {}
219 220 for i in range(0, len(current_scope), 2):
220 221 v[current_scope[i]] = current_scope[i+1]
  222 + r = True
221 223
222   - if len(self.value_stack) > 0:
  224 + if r and len(self.value_stack) > 0:
223 225 self.value_stack[-1][0].append(v)
224 226 self.terminator = self.value_stack[-1][1]
225 227
2  setup.py
@@ -6,7 +6,7 @@
6 6 long_desc=open('README.rst','r').read()
7 7
8 8 setup(name="pyclj",
9   - version="0.1.6",
  9 + version="0.1.7",
10 10 author="Sun Ning",
11 11 author_email="sunng@about.me",
12 12 description="clojure literal reader and writer for python",

0 comments on commit 3e3370b

Please sign in to comment.
Something went wrong with that request. Please try again.