From 939d1d0880ca11d39d69479b5a053f328df3558b Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Wed, 22 Jun 2016 14:45:29 +0100 Subject: [PATCH 1/2] Removed urlparse from send_state_event --- matrix_client/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix_client/api.py b/matrix_client/api.py index 26f8cda1..2699ee0e 100644 --- a/matrix_client/api.py +++ b/matrix_client/api.py @@ -166,7 +166,7 @@ def send_state_event(self, room_id, event_type, content, state_key=""): state_key(str): Optional. The state key for the event. """ path = "/rooms/%s/state/%s" % ( - urlparse.quote(room_id), urlparse.quote(event_type), + quote(room_id), quote(event_type), ) if state_key: path += "/%s" % (quote(state_key)) From 4ebf99bb54cb7b5243ad5fdc5b63ca9ac4558337 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Wed, 22 Jun 2016 14:50:06 +0100 Subject: [PATCH 2/2] Removed unused import urllib.parse --- matrix_client/api.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/matrix_client/api.py b/matrix_client/api.py index 2699ee0e..fc1d2c95 100644 --- a/matrix_client/api.py +++ b/matrix_client/api.py @@ -18,11 +18,9 @@ import requests try: - import urlparse from urllib import quote except ImportError: from urllib.parse import quote - import urllib.parse as urlparse # For python 3 class MatrixError(Exception):