Permalink
Browse files

Patched it up so now it works

  • Loading branch information...
1 parent 5c4cfb4 commit 98b9d2ede4f78f5f4410913e15c4029c82625f89 @sixohsix committed Mar 1, 2009
Showing with 4 additions and 5 deletions.
  1. +4 −5 twitter/api.py
View
@@ -64,12 +64,10 @@ def __call__(self, **kwargs):
headers = {}
if (self.agent):
headers["X-Twitter-Client"] = self.agent
- if (self.username):
- headers["Authorization"] = "Basic " + b64encode("%s:%s" %(
- self.username, self.password))
kwargs = {
- "uri": "%s.%s%s" % (self.uri,self.format,argStr),
+ "uri": "http://%s%s.%s%s" % (
+ self.domain, self.uri, self.format, argStr),
"method": method
}
@@ -81,7 +79,8 @@ def __call__(self, **kwargs):
try:
http = Http()
- http.add_credentials(self.username, self.password, self.domain)
+ if (self.username):
+ http.add_credentials(self.username, self.password, self.domain)
response, content = http.request(**kwargs)
if (response.status == 304):
return []

0 comments on commit 98b9d2e

Please sign in to comment.