]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Replace overly-aggressive comparison for type equality with an isinstance check.
authorJason R. Coombs <jaraco@jaraco.com>
Sat, 10 May 2014 17:24:18 +0000 (13:24 -0400)
committerJason R. Coombs <jaraco@jaraco.com>
Sat, 10 May 2014 17:24:18 +0000 (13:24 -0400)
Lib/distutils/command/upload.py

index 75498b14d57c538eb14318ff609768e2efa4e01e..c279b591c4999cf10c056e8557069609e2b25269 100644 (file)
@@ -146,7 +146,7 @@ class upload(PyPIRCCommand):
         for key, value in data.items():
             title = '\nContent-Disposition: form-data; name="%s"' % key
             # handle multiple entries for the same name
-            if type(value) != type([]):
+            if not isinstance(value, list):
                 value = [value]
             for value in value:
                 if type(value) is tuple: