diff --git a/IntegrationTest.py b/IntegrationTest.py index 4a98593d..0df02bce 100644 --- a/IntegrationTest.py +++ b/IntegrationTest.py @@ -120,7 +120,8 @@ class IntegrationTest: self.dumpUser( self.g.get_user() ) jacquev6 = self.g.get_user( "jacquev6" ) self.dumpUser( jacquev6 ) - self.dumpOrganization( self.g.get_organization( "github" ) ) + self.dumpOrganization( self.g.get_organization( "github" ), doTeams = False ) + self.dumpOrganization( self.g.get_organization( "BeaverSoftware" ), doTeams = True ) self.dumpRepository( jacquev6.get_repo( "PyGithub" ) ) def doSomeWrites( self ): @@ -170,13 +171,14 @@ class IntegrationTest: print sys.stdout.flush() - def dumpOrganization( self, o ): + def dumpOrganization( self, o, doTeams ): print o.login, "(", o.name, ")" print " Members:", ", ".join( u.login for u in o.get_members() ) print " Repos:", ", ".join( r.name for r in o.get_repos() ) - print " Teams:" - for team in o.get_teams(): - print " ", team.name, "(" + team.permission + "):", ", ".join( u.login for u in team.get_members() ), "->", ", ".join( r.name for r in team.get_repos() ) + if doTeams: + print " Teams:" + for team in o.get_teams(): + print " ", team.name, "(" + team.permission + "):", ", ".join( u.login for u in team.get_members() ), "->", ", ".join( r.name for r in team.get_repos() ) print sys.stdout.flush() diff --git a/github/Requester.py b/github/Requester.py index b78cd036..12aa1aeb 100644 --- a/github/Requester.py +++ b/github/Requester.py @@ -28,6 +28,7 @@ class Requester: def __statusCheckedRequest( self, verb, url, parameters, input ): status, headers, output = self.__rawRequest( verb, url, parameters, input ) if status < 200 or status >= 300: + ### @todo Be specific (403 is not the same thing as 404!) raise UnknownGithubObject() return headers, output