From: Tobias Mueller Date: Thu, 13 Jan 2011 17:42:32 +0000 (+0100) Subject: Cleaned up messy logic in pwn X-Git-Url: http://git.maemo.org/git/?p=pwnitter;a=commitdiff_plain;h=d466bef674496b137abd897cb05a72b03b0e9d57;ds=sidebyside Cleaned up messy logic in pwn I think I understood what was going on and that the new logic is equivalent. --- diff --git a/pwnitter.py b/pwnitter.py index e8404c2..5a06ed2 100755 --- a/pwnitter.py +++ b/pwnitter.py @@ -160,8 +160,8 @@ class Pwnitter(dbus.service.Object): # We don't want to repeatedly spam people - # FIXME: What the fuck logic. Please clean up - if not ((not name and host != 'mobile.twitter.com') or name in processed): + # Also proceed if we didn't find a name but are on the mobile page + if not (name in processed) or ((not name) and host == 'mobile.twitter.com'): headers = { "User-Agent": "Mozilla/5.0", "Accept": "application/json, text/javascript, */*",