make request truthy if has transport (#1222)

This commit is contained in:
Raphael Deem 2018-05-16 14:12:12 -07:00 committed by GitHub
parent e1c9020268
commit 202a4c6525
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,6 +78,11 @@ class Request(dict):
self.method,
self.path)
def __bool__(self):
if self.transport:
return True
return False
@property
def json(self):
if self.parsed_json is None: