File fix-syntax-warning-is-1-pr-852.patch of Package python-hug

From b2f2aaa9de620ac79166ed2f09961d28c54b188a Mon Sep 17 00:00:00 2001
From: Jan Varho <jan@varho.org>
Date: Tue, 14 Apr 2020 19:21:40 +0300
Subject: [PATCH] Fix SyntaxWarning due to is 1

---
 hug/input_format.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hug/input_format.py b/hug/input_format.py
index b83d9c1c..c1565f84 100644
--- a/hug/input_format.py
+++ b/hug/input_format.py
@@ -78,6 +78,6 @@ def multipart(body, content_length=0, **header_params):
 
     form = parse_multipart((body.stream if hasattr(body, "stream") else body), header_params)
     for key, value in form.items():
-        if type(value) is list and len(value) is 1:
+        if type(value) is list and len(value) == 1:
             form[key] = value[0]
     return form
openSUSE Build Service is sponsored by