From 3aee448428450de72baae472c50e3a12e6303607 Mon Sep 17 00:00:00 2001 From: Raja Reddy Karri Date: Thu, 27 Aug 2015 15:49:35 +0530 Subject: [PATCH] Fixing https://github.com/PyGithub/PyGithub/issues/335. Issue.remove_from_labels fails when the label passed is a string with whitespace characters --- github/Issue.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/github/Issue.py b/github/Issue.py index 44e2f283..f88e9519 100644 --- a/github/Issue.py +++ b/github/Issue.py @@ -27,6 +27,7 @@ # # # ############################################################################## +import urllib import github.GithubObject import github.PaginatedList @@ -355,6 +356,8 @@ class Issue(github.GithubObject.CompletableGithubObject): assert isinstance(label, (github.Label.Label, str, unicode)), label if isinstance(label, github.Label.Label): label = label._identity + else: + label = urllib.quote(label) headers, data = self._requester.requestJsonAndCheck( "DELETE", self.url + "/labels/" + label