UI/FindFileDialog.py

branch
maintenance
changeset 5547
00e8452972f0
parent 5389
9b1c800daff3
child 5558
858abfcbaf28
diff -r e7fff6f1ff19 -r 00e8452972f0 UI/FindFileDialog.py
--- a/UI/FindFileDialog.py	Sun Feb 19 15:22:42 2017 +0100
+++ b/UI/FindFileDialog.py	Wed Feb 22 19:25:07 2017 +0100
@@ -11,6 +11,7 @@
 
 import os
 import re
+import sys
 
 from PyQt5.QtCore import pyqtSignal, Qt, pyqtSlot
 from PyQt5.QtGui import QCursor
@@ -370,7 +371,10 @@
             txt = re.escape(ct)
         if wo:
             txt = "\\b{0}\\b".format(txt)
-        flags = re.UNICODE | re.LOCALE
+        if sys.version_info[0] == 2:
+            flags = re.UNICODE | re.LOCALE
+        else: 
+            flags = re.UNICODE
         if not cs:
             flags |= re.IGNORECASE
         try:

eric ide

mercurial