From eccfe997d964d498bf9bc73c095636ccdad48c9a Mon Sep 17 00:00:00 2001 From: Anna Date: Wed, 19 May 2010 23:02:25 -0400 Subject: [PATCH] Refresh time is in minutes, minimum one. This is to account for the shoddy rate limiting that twitter does... seriously, twitter, just get better hardware --- mytwitter.conf | 3 ++- mytwitter.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mytwitter.conf b/mytwitter.conf index 55a7a17..b448f8d 100644 --- a/mytwitter.conf +++ b/mytwitter.conf @@ -1,6 +1,7 @@ [global] +debug=0 entries=20 -refreshtime=30 +refreshtime=5 dbfile=~/.mytwitter.db [account] diff --git a/mytwitter.py b/mytwitter.py index 2786202..95d70fc 100755 --- a/mytwitter.py +++ b/mytwitter.py @@ -31,7 +31,7 @@ class MyTwitter(): config.set('global', 'entries', '20') new_data = True if not config.has_option('global', 'refreshtime'): - config.set('global', 'refreshtime', '30') + config.set('global', 'refreshtime', '5') new_data = True if not config.has_option('global', 'dbfile'): config.set('global', 'dbfile', '~/.mytwitter.db') @@ -82,8 +82,8 @@ class MyTwitter(): if not self.db.has_key('open_tabs'): self.db['open_tabs'] = [(self.username + '/Home', None, False), ('@' + self.username, None, False), (self.username + '/Direct Messages', None, False)] - if self.refresh_time < 10: - self.refresh_time = 10 + # refresh_time is in minutes... convert to seconds here + self.refresh_time *= 60 self.reply_id = None