open file with universal line endings
this is a temporary solution until the proper unicode support is finished
@@ -9,7 +9,6 @@ Util module.
import datetime
import hashlib
-import io
import json
import os
import re
@@ -482,11 +481,11 @@ def get_line(file_name, line_no):
string.
"""
try:
- with io.open(file_name) as source_file:
+ with open(file_name, 'U') as source_file:
for line in source_file:
line_no -= 1
if line_no == 0:
- return line.encode('utf8')
+ return line
return ''
except IOError:
return ''
