|
@@ -10,6 +10,7 @@ import mpp.api
|
|
|
|
|
|
import re
|
|
|
import os
|
|
|
+import sys
|
|
|
import logging
|
|
|
import time
|
|
|
import binascii
|
|
@@ -142,11 +143,14 @@ class DirectoryReader():
|
|
|
ts = time.time()
|
|
|
f = open(full_path, 'rU');
|
|
|
text = f.read();
|
|
|
+ # getting along with the different string handling of python 2 and 3
|
|
|
+ if sys.version_info[0] < 3:
|
|
|
+ text = text.decode('utf-8')
|
|
|
f.close()
|
|
|
checksum = binascii.crc32(text.encode('utf8')) & 0xffffffff # to match python 3
|
|
|
|
|
|
db_loader = plugin.get_plugin('mpp.dbf').get_loader()
|
|
|
- (data, is_updated) = db_loader.create_file_data(norm_path, checksum, str(text))
|
|
|
+ (data, is_updated) = db_loader.create_file_data(norm_path, checksum, text)
|
|
|
procerrors = parser.process(plugin, data, is_updated)
|
|
|
if plugin.is_proctime_enabled == True:
|
|
|
data.set_data('std.general', 'proctime',
|