Commits

Matt Chaput  committed d8001e7

Removed print_function import to fix error in Python 2.5.
Removed debug flag from parsing test.

  • Participants
  • Parent commits 3544fa8

Comments (0)

Files changed (2)

File src/whoosh/qparser/common.py

 parser modules.
 """
 
-from __future__ import print_function
+import sys
+
 from whoosh.compat import string_type
 
 
     return q
 
 
-def print_debug(level, msg):
+def print_debug(level, msg, out=sys.stderr):
     if level:
-        print("  " * (level - 1), msg)
+        out.write("%s%s\n" % (" " * (level - 1), msg))

File tests/test_parsing.py

 def test_stopped():
     schema = fields.Schema(text=fields.TEXT)
     qp = default.QueryParser("text", schema)
-    q = qp.parse(u("a b"), debug=True)
+    q = qp.parse(u("a b"))
     assert_equal(q, query.NullQuery)
 
 def test_analyzing_terms():