Skip to content

Commit

Permalink
Improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
ateska committed Apr 14, 2019
1 parent 3dc6a62 commit 43bb74b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions itss.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,14 @@ def enroll(self, enrollment_id):
r = requests.put(self.EA_url + '/cits/ts_102941_v111/ea/enroll', data=encoded_er)

print(">>>", self.EA_url + '/cits/ts_102941_v111/ea/enroll')
if r.status_code != 200:
print("Enrollment failed!")
if r.headers.get('Content-Type', "").startswith('application/json'):
pprint.pprint(r.json())
else:
print(r.content)
sys.exit(1)

EnrolmentResponse = self.asn1.decode('EnrolmentResponse', r.content)
if EnrolmentResponse[0] != 'successfulEnrolment':
print("Enrollment failed!")
Expand Down

0 comments on commit 43bb74b

Please sign in to comment.