Explorar o código

Remove unnecessary special case for Python 2
read_string() is only used by tests and no tests fail with this removed

Mike Naberezny %!s(int64=10) %!d(string=hai) anos
pai
achega
99ac5ca683
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      supervisor/options.py

+ 2 - 3
supervisor/options.py

@@ -1664,12 +1664,11 @@ _marker = []
 
 class UnhosedConfigParser(ConfigParser.RawConfigParser):
     mysection = 'supervisord'
+
     def read_string(self, s):
-        if not PY3 and isinstance(s, str):
-            s = unicode(s)
         s = StringIO(s)
         try:
-            return self.read_file(s)
+            return self.read_file(s) # Python 3.2 or later
         except AttributeError:
             return self.readfp(s)