浏览代码

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

Mike Naberezny 10 年之前
父节点
当前提交
99ac5ca683
共有 1 个文件被更改,包括 2 次插入3 次删除
  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)