String, code cleanups.

This commit is contained in:
Bill Dengler 2015-05-13 20:40:21 -04:00
parent e92565013b
commit feda70aea8
3 changed files with 2 additions and 6 deletions

View File

@ -68,10 +68,6 @@ def is_audio(tweet,force=False):
except: except:
log.exception("Exception while executing is_audio Codeofdusk algorithm.") log.exception("Exception while executing is_audio Codeofdusk algorithm.")
tweet['is_audio']=False tweet['is_audio']=False
if len(tweet["entities"]["hashtags"]) > 0:
for i in tweet["entities"]["hashtags"]:
if i["text"] == "audio":
return True
return False return False
def is_geocoded(tweet): def is_geocoded(tweet):

View File

@ -30,7 +30,7 @@ class general(wx.Panel, baseDialog.BaseWXDialog):
self.hide_gui = wx.CheckBox(self, -1, _(u"Hide GUI on launch")) self.hide_gui = wx.CheckBox(self, -1, _(u"Hide GUI on launch"))
sizer.Add(self.hide_gui, 0, wx.ALL, 5) sizer.Add(self.hide_gui, 0, wx.ALL, 5)
self.SetSizer(sizer) self.SetSizer(sizer)
self.use_slow_audio_algo= wx.CheckBox(self, -1, _(U"Use slow audio tweet detection algorithm (improves audio tweet detection accuracy at the cost of performance))")) self.use_slow_audio_algo= wx.CheckBox(self, -1, _(U"Use slow audio tweet detection algorithm (improves audio tweet detection accuracy at the cost of performance)"))
sizer.Add(self.use_slow_audio_algo, 0, wx.ALL, 5) sizer.Add(self.use_slow_audio_algo, 0, wx.ALL, 5)
class proxy(wx.Panel, baseDialog.BaseWXDialog): class proxy(wx.Panel, baseDialog.BaseWXDialog):

View File

@ -3,7 +3,7 @@ import wx
class urlList(wx.Dialog): class urlList(wx.Dialog):
def __init__(self): def __init__(self):
super(urlList, self).__init__(parent=None, title=_(u"Select an URL")) super(urlList, self).__init__(parent=None, title=_(u"Select URL"))
panel = wx.Panel(self) panel = wx.Panel(self)
self.lista = wx.ListBox(panel, -1) self.lista = wx.ListBox(panel, -1)
self.lista.SetFocus() self.lista.SetFocus()