Skip to content

Commit 02326d2

Browse files
authored
Merge pull request #375 from liho00/liho00-patch-1
Update models.py
2 parents 5762a26 + 13efd27 commit 02326d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontera/core/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def body(self):
8181

8282
def __str__(self):
8383
return "<%s at 0x%0x %s meta=%s body=%s... cookies=%s, headers=%s>" % (type(self).__name__, id(self), self.url,
84-
str(self.meta), str(self.body[:20]),
84+
str(self.meta), str(self.body[:20]) if self.body is not None else None,
8585
str(self.cookies), str(self.headers))
8686

8787
def __hash__(self):
@@ -163,6 +163,6 @@ def __str__(self):
163163
return "<%s at 0x%0x %s %s meta=%s body=%s... headers=%s>" % (type(self).__name__,
164164
id(self), self.status_code,
165165
self.url, str(self.meta),
166-
str(self.body[:20]), str(self.headers))
166+
str(self.body[:20]) if self.body is not None else None, str(self.headers))
167167

168168
__repr__ = __str__

0 commit comments

Comments
 (0)