Skip to content

Commit d3827ed

Browse files
committed
Add reprs to PagesInfo and PagesBuild
1 parent e260c58 commit d3827ed

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

github3/repos/pages.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# -*- coding: utf-8 -*-
2+
from __future__ import unicode_literals
13
from github3.models import GitHubObject
24

35

@@ -15,6 +17,13 @@ def __init__(self, info):
1517
#: Boolean indicating whether there is a custom 404 for the pages site
1618
self.custom_404 = info.get('custom_404')
1719

20+
def _repr(self):
21+
info = self.cname or ''
22+
if info:
23+
info += '/'
24+
info += self.status or ''
25+
return '<Pages Info [{0}]>'.format(info)
26+
1827

1928
class PagesBuild(GitHubObject):
2029
def __init__(self, build):
@@ -43,3 +52,6 @@ def __init__(self, build):
4352

4453
#: Datetime the build was updated
4554
self.updated_at = self._strptime(build.get('updated_at'))
55+
56+
def _repr(self):
57+
return '<Pages Build [{0}/{1}]>'.format(self.commit, self.status)

0 commit comments

Comments
 (0)