From: Jason R. Coombs Date: Sat, 10 May 2014 17:24:18 +0000 (-0400) Subject: Replace overly-aggressive comparison for type equality with an isinstance check. X-Git-Tag: v3.5.0a1~1701 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0375653371cba48f921c883cfc1142f14babeff0;p=thirdparty%2FPython%2Fcpython.git Replace overly-aggressive comparison for type equality with an isinstance check. --- diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py index 75498b14d57c..c279b591c499 100644 --- a/Lib/distutils/command/upload.py +++ b/Lib/distutils/command/upload.py @@ -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: