From 80bc6f9fd0908b6b3f660da57e122ed900de9f61 Mon Sep 17 00:00:00 2001 From: Ryan McGrath Date: Mon, 31 Aug 2009 02:15:57 -0400 Subject: [PATCH] Fixing id error in .destroyStatus(). For some reason, this method is still returning consistent 400 HTTP response codes, but I get the feeling this is moreso a bug with Twitter than with Twython. The request works, and deletes whatever status was specified, but there's no proper values returned from Twitter that are in line with their specs. --- twython.py | 2 +- twython3k.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/twython.py b/twython.py index 6cff785..15c4a0b 100644 --- a/twython.py +++ b/twython.py @@ -487,7 +487,7 @@ class setup: """ if self.authenticated is True: try: - return simplejson.load(self.opener.open("http://twitter.com/status/destroy/%s.json", "POST" % id)) + return simplejson.load(self.opener.open("http://twitter.com/status/destroy/%s.json" % `id`, "DELETE")) except HTTPError, e: raise TwythonError("destroyStatus() failed with a %s error code." % `e.code`, e.code) else: diff --git a/twython3k.py b/twython3k.py index 07820fe..338effd 100644 --- a/twython3k.py +++ b/twython3k.py @@ -487,7 +487,7 @@ class setup: """ if self.authenticated is True: try: - return simplejson.load(self.opener.open("http://twitter.com/status/destroy/%s.json", "POST" % id)) + return simplejson.load(self.opener.open("http://twitter.com/status/destroy/%s.json" % `id`, "POST")) except HTTPError as e: raise TwythonError("destroyStatus() failed with a %s error code." % repr(e.code), e.code) else: