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