From e0d11fe9a3a1bf945d0de47e0ffaa3e074096a7c Mon Sep 17 00:00:00 2001 From: Eratosthenes Date: Tue, 26 Jan 2010 10:56:07 -0500 Subject: [PATCH] Fix problem with finding HHs for utf-16 files. --- pyfpdb/HandHistoryConverter.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pyfpdb/HandHistoryConverter.py b/pyfpdb/HandHistoryConverter.py index c0374143..bec2ebae 100644 --- a/pyfpdb/HandHistoryConverter.py +++ b/pyfpdb/HandHistoryConverter.py @@ -440,10 +440,9 @@ or None if we fail to get the info """ #print "trying", kodec try: in_fh = codecs.open(self.in_path, 'r', kodec) - in_fh.seek(self.index) - log.debug("Opened in_path: '%s' with %s" % (self.in_path, kodec)) - self.obs = in_fh.read() - self.index = in_fh.tell() + whole_file = in_fh.read() + self.obs = whole_file[self.index:] + self.index = len(whole_file) in_fh.close() break except: