238 if sys.version_info[0] == 2: |
238 if sys.version_info[0] == 2: |
239 file_enc = filename.encode(sys.getfilesystemencoding()) |
239 file_enc = filename.encode(sys.getfilesystemencoding()) |
240 else: |
240 else: |
241 file_enc = filename |
241 file_enc = filename |
242 |
242 |
243 # It also encode the code back to avoid 'Encoding declaration in |
|
244 # unicode string' exception on Python2 |
|
245 codestring = normalizeCode(codestring) |
243 codestring = normalizeCode(codestring) |
246 |
244 |
247 # Check for VCS conflict markers |
245 # Check for VCS conflict markers |
248 for conflictMarkerRe in VcsConflictMarkerRegExpList: |
246 for conflictMarkerRe in VcsConflictMarkerRegExpList: |
249 conflict = conflictMarkerRe.search(codestring) |
247 conflict = conflictMarkerRe.search(codestring) |