Skip to content

Commit da65563

Browse files
committed
remove python2 changes
1 parent 093e4c5 commit da65563

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

AWSIoTPythonSDK/core/protocol/paho/client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,8 +1123,7 @@ def subscribe(self, topic, qos=0):
11231123
zero string length, or if topic is not a string, tuple or list.
11241124
"""
11251125
topic_qos_list = None
1126-
# Client.subscribe() now accepts unicode type topic inputs on Python 2
1127-
if isinstance(topic, str) or (sys.version_info[0] == 2 and isinstance(topic, unicode)):
1126+
if isinstance(topic, str) :
11281127
if qos<0 or qos>2:
11291128
raise ValueError('Invalid QoS level.')
11301129
if topic is None or len(topic) == 0:
@@ -1172,8 +1171,7 @@ def unsubscribe(self, topic):
11721171
topic_list = None
11731172
if topic is None:
11741173
raise ValueError('Invalid topic.')
1175-
# Client.unsubscribe() now accepts unicode type topic inputs on Python 2
1176-
if isinstance(topic, str) or (sys.version_info[0] == 2 and isinstance(topic, unicode)):
1174+
if isinstance(topic, str) :
11771175
if len(topic) == 0:
11781176
raise ValueError('Invalid topic.')
11791177
topic_list = [topic.encode('utf-8')]

0 commit comments

Comments
 (0)