We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9f803a commit 11f6422Copy full SHA for 11f6422
1 file changed
pyral/rallyresp.py
@@ -238,6 +238,17 @@ def _item(self):
238
def __iter__(self):
239
return self
240
241
+ def __nonzero__(self):
242
+ """
243
+ This is for evaluating any invalid response as False.
244
+
245
+ :return:
246
247
+ if 200 <= self.status_code < 300:
248
+ return True
249
+ else:
250
+ return False
251
252
def next(self):
253
"""
254
Return a hydrated instance from the self.page until the page is exhausted,
0 commit comments