Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added optional base_url argument to GitHub.__init__.

A proper abstraction to

  github.BaseEndPoint.BASE_URL = "/something/else"
  • Loading branch information...
commit 15c995ae67fb784d5e401e3af59fbd639d0a9185 1 parent 4552978
Mark Ellzey authored committed
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/github.py
View
9 src/github.py
@@ -628,11 +628,14 @@ def addRepoToTeam(self, team_id, user, repo):
class GitHub(object):
"""Interface to github."""
- def __init__(self, user=None, token=None, fetcher=default_fetcher):
- self.user = user
- self.token = token
+ def __init__(self, user=None, token=None, fetcher=default_fetcher, base_url=None):
+ self.user = user
+ self.token = token
self.fetcher = fetcher
+ if base_url:
+ BaseEndpoint.BASE_URL = base_url
+
@property
def users(self):
"""Get access to the user API."""
Please sign in to comment.
Something went wrong with that request. Please try again.