Skip to content

Commit e40c5e0

Browse files
fixed reference to correct response object and changed errorcode to compare to int
1 parent cafe3c9 commit e40c5e0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

objsamples/sample_list_subscriber.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,18 @@
4343
if postResponse.status is False:
4444
# If the subscriber already exists in the account then we need to do an update.
4545
# Update Subscriber On List
46-
if postResponse.results[0]['ErrorCode'] == '12014':
46+
if postResponse.results[0]['ErrorCode'] == 12014:
4747
# Update Subscriber to add to List
4848
print '>>> Update Subscriber to add to List'
4949
patchSub = ET_Client.ET_Subscriber()
5050
patchSub.auth_stub = stubObj
5151
patchSub.props = {"EmailAddress" : SubscriberTestEmail, "Lists" :[{"ID" : newListID}]}
5252
patchResponse = patchSub.patch()
53-
print 'Patch Status: ' + str(postResponse.status)
54-
print 'Code: ' + str(postResponse.code)
55-
print 'Message: ' + str(postResponse.message)
56-
print 'Result Count: ' + str(len(postResponse.results))
57-
print 'Results: ' + str(postResponse.results)
53+
print 'Patch Status: ' + str(patchResponse.status)
54+
print 'Code: ' + str(patchResponse.code)
55+
print 'Message: ' + str(patchResponse.message)
56+
print 'Result Count: ' + str(len(patchResponse.results))
57+
print 'Results: ' + str(patchResponse.results)
5858

5959
# Retrieve all Subscribers on the List
6060
print '>>> Retrieve all Subscribers on the List'

0 commit comments

Comments
 (0)