From bb5f79e07b1ecc6f3fc592affcc91cc90f86d94c Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Wed, 13 May 2015 14:42:42 -0400 Subject: [PATCH] Removed output, time tests. --- src/sound.py | 7 ------- src/twitter/utils.py | 5 ----- 2 files changed, 12 deletions(-) diff --git a/src/sound.py b/src/sound.py index 3b95f118..e5e0e00c 100644 --- a/src/sound.py +++ b/src/sound.py @@ -13,7 +13,6 @@ import output system = platform.system() from mysc.repeating_timer import RepeatingTimer import application -import time URLPlayer = None def setup(): @@ -136,22 +135,16 @@ class URLStream(object): log.debug("played") def is_playable(self, url,play=False,volume=1.0): - print "Playability test invoked." - start=time.time() try: log.debug("Checking URL playability...") self.prepare(url) if self.prepared == True: stream=sound_lib.stream.URLStream(url=self.url) - end=time.time() - print "is_playable algo took",end-start,"seconds." if play: return self.play(stream=stream,volume=volume) return True except: log.exception("Exception.") - end=time.time() - print "is_playable algo took",end-start,"seconds." return False def stop_audio(self): if hasattr(self, "stream") and self.stream.is_playing == True: diff --git a/src/twitter/utils.py b/src/twitter/utils.py index e14235d0..64ae50bd 100644 --- a/src/twitter/utils.py +++ b/src/twitter/utils.py @@ -45,7 +45,6 @@ def find_next_reply(id, listItem): return None def is_audio(tweet,force=False): - start=time.time() if force == False and 'is_audio' in tweet: return tweet['is_audio'] try: @@ -64,14 +63,10 @@ def is_audio(tweet,force=False): if config.app["app-settings"]["use_modern_audio_algo"]: for u in find_urls(tweet): if url_is_audio(u): - end=time.time() - print "Codeofdusk algo took",end-start,"seconds." tweet['is_audio']=True return True except: log.exception("Exception while executing is_audio Codeofdusk algorithm.") - end=time.time() - print "Codeofdusk algo took",end-start,"seconds." tweet['is_audio']=False if len(tweet["entities"]["hashtags"]) > 0: for i in tweet["entities"]["hashtags"]: