Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions matrix_client/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -166,7 +164,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))
Expand Down