Merge pull request #649 from mattrobenolt/patch-1

Removed untested optional dependency on mx libraries.
This commit is contained in:
Aymeric Augustin 2013-01-15 10:16:59 -08:00
commit b4b0034917
1 changed files with 1 additions and 6 deletions

View File

@ -439,11 +439,6 @@ class BoundaryIter(six.Iterator):
if not unused_char:
raise InputStreamExhausted()
self._stream.unget(unused_char)
try:
from mx.TextTools import FS
self._fs = FS(boundary).find
except ImportError:
self._fs = lambda data: data.find(boundary)
def __iter__(self):
return self
@ -499,7 +494,7 @@ class BoundaryIter(six.Iterator):
* the end of current encapsulation
* the start of the next encapsulation
"""
index = self._fs(data)
index = data.find(self._boundary)
if index < 0:
return None
else: