A few fixes.
authorJosh Roesslein <jroesslein@gmail.com>
Mon, 6 Jul 2009 00:19:06 +0000 (19:19 -0500)
committerJosh Roesslein <jroesslein@gmail.com>
Mon, 6 Jul 2009 00:19:06 +0000 (19:19 -0500)
api.py
binder.py

diff --git a/api.py b/api.py
index 4d0c9d1f40e6c2e66eaa1a22125fd6b0c7674eda..373961b87fcdb77f2fda2cae8abf38c27ef6a347 100644 (file)
--- a/api.py
+++ b/api.py
@@ -10,7 +10,7 @@ class API(object):
   def __init__(self, username=None, password=None, host='twitter.com', secure=False,
                 classes={'user': User, 'status': Status}):
     if username and password:
-      self._b64up = base64.encode('%s:%s' % (username, password))
+      self._b64up = base64.b64encode('%s:%s' % (username, password))
     else:
       self._b64up = None
     self.host = host
index c3961dbcdaa8d2cdbbb35cbd75dee0b7f722c05e..5c704880db791ecb2c6569479ca8dd9f326970d9 100644 (file)
--- a/binder.py
+++ b/binder.py
@@ -1,4 +1,5 @@
 import httplib
+import urllib
 
 from parsers import parse_error
 from error import TweepError