eric6/Plugins/VcsPlugins/vcsGit/GitUtilities.py

branch
without_py2_and_pyqt4
changeset 7192
a22eee00b052
parent 6942
2602857055c5
child 7229
53054eb5b15a
diff -r 960850ec284c -r a22eee00b052 eric6/Plugins/VcsPlugins/vcsGit/GitUtilities.py
--- a/eric6/Plugins/VcsPlugins/vcsGit/GitUtilities.py	Sat Aug 31 12:29:57 2019 +0200
+++ b/eric6/Plugins/VcsPlugins/vcsGit/GitUtilities.py	Sat Aug 31 12:58:11 2019 +0200
@@ -10,9 +10,8 @@
 from __future__ import unicode_literals
 
 import os
-import sys
 
-from PyQt5.QtCore import QProcessEnvironment, QByteArray
+from PyQt5.QtCore import QProcessEnvironment
 
 import Utilities
 
@@ -45,23 +44,3 @@
         env.insert("LANGUAGE", language)
     
     proc.setProcessEnvironment(env)
-
-
-try:
-    from Globals import strToQByteArray
-except ImportError:
-    def strToQByteArray(txt):
-        """
-        Module function to convert a Python string into a QByteArray.
-        
-        @param txt Python string to be converted
-        @type str, bytes, bytearray, unicode
-        """
-        if sys.version_info[0] == 2:
-            if isinstance(txt, unicode):    # __IGNORE_WARNING__
-                txt = txt.encode("utf-8")
-        else:
-            if isinstance(txt, str):
-                txt = txt.encode("utf-8")
-        
-        return QByteArray(txt)

eric ide

mercurial