Created
October 23, 2009 15:49
-
-
Save ecarnevale/216995 to your computer and use it in GitHub Desktop.
hack for a quick fix of Raindrop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r e07f7793ad1b server/python/raindrop/proto/imap.py | |
--- a/server/python/raindrop/proto/imap.py Fri Oct 23 15:10:01 2009 +1100 | |
+++ b/server/python/raindrop/proto/imap.py Fri Oct 23 17:48:16 2009 +0200 | |
@@ -102,7 +102,7 @@ | |
# Probably: http://twistedmatrix.com/trac/ticket/1443 | |
# "[imap4] mismatched quoting spuriously raised" - raised early 2006 :( | |
try: | |
- imap4.IMAP4Client._defaultHandler(self, tag, rest) | |
+ imap4.IMAP4Client._defaultHandler(self, str(tag), str(rest)) | |
except imap4.MismatchedQuoting, exc: | |
logger.warn('ignoring mismatched quoting error: %s', exc) | |
# The rest seems necessary to 'gracefully' ignore the error. | |
diff -r e07f7793ad1b server/python/raindrop/proto/rss.py | |
--- a/server/python/raindrop/proto/rss.py Fri Oct 23 15:10:01 2009 +1100 | |
+++ b/server/python/raindrop/proto/rss.py Fri Oct 23 17:48:16 2009 +0200 | |
@@ -50,7 +50,7 @@ | |
if parsed.scheme == 'http': | |
# Note we *must* use the full uri here and not just the path portion | |
# or getsatisfaction returns invalid urls... | |
- factory = HTTPClientFactory(uri, headers=req_headers) | |
+ factory = HTTPClientFactory(str(uri), headers=req_headers) | |
else: | |
logger.error("Can't fetch URI %r - unknown scheme", uri) | |
return | |
diff -r e07f7793ad1b server/python/raindrop/wetpaisley.py | |
--- a/server/python/raindrop/wetpaisley.py Fri Oct 23 15:10:01 2009 +1100 | |
+++ b/server/python/raindrop/wetpaisley.py Fri Oct 23 17:48:16 2009 +0200 | |
@@ -71,7 +71,7 @@ | |
if self.username: | |
auth = base64.b64encode(self.username + ":" + self.password) | |
headers["Authorization"] = "Basic " + auth | |
- factory = HTTPClientFactory(url, **kwargs) | |
+ factory = HTTPClientFactory(str(url), **kwargs) | |
reactor.connectTCP(self.host, self.port, factory) | |
return factory.deferred | |
@@ -163,7 +163,7 @@ | |
kwargs["headers"] = {"Accept": "application/json", | |
"Content-Type": content_type, | |
} | |
- factory = HTTPClientFactory(url, **kwargs) | |
+ factory = HTTPClientFactory(str(url), **kwargs) | |
from twisted.internet import reactor | |
reactor.connectTCP(self.host, self.port, factory) | |
d = factory.deferred |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Plus in | |
/usr/lib/python2.6/dist-packages/twisted/internet/abstract.py | |
line 160 to 174 becomes: | |
if isinstance(str(data), unicode): # no, really, I mean it | |
raise TypeError("Data must not be unicode") | |
if not self.connected or self._writeDisconnected: | |
return | |
if data: | |
data=str(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment