# HG changeset patch # User dclinton@b35c0ba3-1128-0410-9219-0b39014e361d # Date 1244555119 0 # Branch dclinton # Node ID 056bb4e69e8955edeedd10b2d23a8d57a07db852 # Parent 08d7b67771ca0907d29137d2e28d55a5015b123c Change casts to ints to casts to longs for id verification. diff -r 08d7b67771ca0907d29137d2e28d55a5015b123c -r 056bb4e69e8955edeedd10b2d23a8d57a07db852 twitter.py --- a/twitter.py Thu Jun 04 18:21:59 2009 +0000 +++ b/twitter.py Tue Jun 09 13:45:19 2009 +0000 @@ -132,7 +132,7 @@ now = time.time() fudge = 1.25 created_at_in_seconds = ComputeCreatedAtInSeconds(status) - delta = int(now) - int(created_at_in_seconds) + delta = long(now) - long(created_at_in_seconds) if delta < (1 * fudge): return 'about a second ago' elif delta < (60 * (1/fudge)): @@ -504,9 +504,9 @@ ''' try: if id: - int(id) + long(id) except: - raise TwitterError("id must be an integer") + raise TwitterError("id must be a long integer") url = 'http://twitter.com/statuses/show/%s.json' % id json = self._FetchUrl(url) data = simplejson.loads(json) @@ -527,9 +527,9 @@ ''' try: if id: - int(id) + long(id) except: - raise TwitterError("id must be an integer") + raise TwitterError("id must be a long integer") url = 'http://twitter.com/statuses/destroy/%s.json' % id json = self._FetchUrl(url, post_data={}) data = simplejson.loads(json)