aboutsummaryrefslogtreecommitdiffstats
path: root/github3/core.py
diff options
context:
space:
mode:
authorKenneth Reitz <me@kennethreitz.com>2011-10-19 02:36:09 -0400
committerKenneth Reitz <me@kennethreitz.com>2011-10-19 02:36:09 -0400
commit68ba47c4648695c2890ecdd54e6163a67f16222f (patch)
tree610b216971497b171991d13f1637fdd339bd8304 /github3/core.py
parentcache response data, update patched resources! (diff)
downloadpython-github3-68ba47c4648695c2890ecdd54e6163a67f16222f.tar.xz
python-github3-68ba47c4648695c2890ecdd54e6163a67f16222f.zip
proper requests authentication
Diffstat (limited to 'github3/core.py')
-rw-r--r--github3/core.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/github3/core.py b/github3/core.py
index 5968ace..6221f9e 100644
--- a/github3/core.py
+++ b/github3/core.py
@@ -29,13 +29,9 @@ def no_auth():
def basic_auth(username, password):
"""Returns an authenticated Github object, via HTTP Basic."""
- def enable_auth(*args, **kwargs):
- kwargs['auth'] = (username, password)
- return args, kwargs
-
gh = Github()
gh.is_authenticated = True
- gh._requests_pre_hook = enable_auth
+ gh.session.auth = (username, password)
return gh