Advertisement
Guest User

Untitled

a guest
Jul 26th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. def my_function(self):
  2. resp = self.resp
  3. if resp.status_code == 404:
  4. raise NoSuchElementError('GET'+self.url+'{}'.format(resp.status_code))
  5. elif resp.status_code == 500:
  6. raise ServerErrorError('GET'+self.url+'{}'.format(resp.status_code))
  7.  
  8. Traceback (most recent call last):
  9. File "test.py", line 32, in <module>
  10. print ins.my_function()
  11. File "api.py", line 820, in my_function
  12. raise NoSuchElementError('GET ' + self.url + ' {} '.format(resp.status_code))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement