Removed unneeded prints
This commit is contained in:
		| @@ -69,12 +69,11 @@ class baseBuffer(object): | ||||
| 		try: | ||||
| 			num = getattr(self.session, "get_newsfeed")(show_nextpage=show_nextpage, name=self.name, *self.args, **self.kwargs) | ||||
| 		except VkAPIMethodError as err: | ||||
| 			print(u"Error {0}: {1}".format(err.code, err.message)) | ||||
| 			log.error(u"Error {0}: {1}".format(err.code, err.message)) | ||||
| 			retrieved = err.code | ||||
| 			return retrieved | ||||
| 		if show_nextpage  == False: | ||||
| 			if self.tab.list.get_count() > 0 and num > 0: | ||||
| 				print "inserting a value" | ||||
| 				v = [i for i in self.session.db[self.name]["items"][:num]] | ||||
| 				v.reverse() | ||||
| 				[self.insert(i, True) for i in v] | ||||
| @@ -200,7 +199,7 @@ class baseBuffer(object): | ||||
| 				self.session.vk.client.wall.addComment(owner_id=user, post_id=id, text=msg) | ||||
| 				output.speak(_(u"You've posted a comment")) | ||||
| 			except Exception as msg: | ||||
| 				print msg | ||||
| 				log.error(msg) | ||||
|  | ||||
| 	def get_event(self, ev): | ||||
| 		if ev.GetKeyCode() == wx.WXK_RETURN and ev.ControlDown() and ev.ShiftDown(): event = "pause_audio" | ||||
| @@ -280,14 +279,12 @@ class feedBuffer(baseBuffer): | ||||
| 		retrieved = True | ||||
| 		try: | ||||
| 			num = getattr(self.session, "get_page")(show_nextpage=show_nextpage, name=self.name, *self.args, **self.kwargs) | ||||
| 			print num | ||||
| 		except VkAPIMethodError as err: | ||||
| 			print(u"Error {0}: {1}".format(err.code, err.message)) | ||||
| 			log.error(u"Error {0}: {1}".format(err.code, err.message)) | ||||
| 			retrieved = err.code | ||||
| 			return retrieved | ||||
| 		if show_nextpage  == False: | ||||
| 			if self.tab.list.get_count() > 0 and num > 0: | ||||
| 				print "inserting a value" | ||||
| 				v = [i for i in self.session.db[self.name]["items"][:num]] | ||||
| 				v.reverse() | ||||
| 				[self.insert(i, True) for i in v] | ||||
| @@ -602,12 +599,11 @@ class chatBuffer(baseBuffer): | ||||
| 		try: | ||||
| 			num = getattr(self.session, "get_messages")(name=self.name, *self.args, **self.kwargs) | ||||
| 		except VkAPIMethodError as err: | ||||
| 			print(u"Error {0}: {1}".format(err.code, err.message)) | ||||
| 			log.error(u"Error {0}: {1}".format(err.code, err.message)) | ||||
| 			retrieved = err.code | ||||
| 			return retrieved | ||||
| 		if show_nextpage  == False: | ||||
| 			if self.tab.list.get_count() > 0 and num > 0: | ||||
| 				print "inserting a value" | ||||
| 				v = [i for i in self.session.db[self.name]["items"][:num]] | ||||
| 				v.reverse() | ||||
| 				[self.insert(i, False) for i in v] | ||||
| @@ -700,8 +696,6 @@ class chatBuffer(baseBuffer): | ||||
| 					break | ||||
| 			if url != "": | ||||
| 				webbrowser.open_new_tab(url) | ||||
| 			else: | ||||
| 				print attachment["photo"].keys() | ||||
| 		else: | ||||
| 			log.debug("Unhandled attachment: %r" % (attachment,)) | ||||
|  | ||||
| @@ -749,13 +743,12 @@ class requestsBuffer(peopleBuffer): | ||||
| 		try: | ||||
| 			ids = self.session.vk.client.friends.getRequests(*self.args, **self.kwargs) | ||||
| 		except VkAPIMethodError as err: | ||||
| 			print(u"Error {0}: {1}".format(err.code, err.message)) | ||||
| 			log.error(u"Error {0}: {1}".format(err.code, err.message)) | ||||
| 			retrieved = err.code | ||||
| 			return retrieved | ||||
| 		num = self.session.get_page(name=self.name, show_nextpage=show_nextpage, endpoint="get", parent_endpoint="users", count=1000, user_ids=", ".join([str(i) for i in ids["items"]]), fields="uid, first_name, last_name, last_seen") | ||||
| 		if show_nextpage  == False: | ||||
| 			if self.tab.list.get_count() > 0 and num > 0: | ||||
| 				print "inserting a value" | ||||
| 				v = [i for i in self.session.db[self.name]["items"][:num]] | ||||
| 				v.reverse() | ||||
| 				[self.insert(i, True) for i in v] | ||||
|   | ||||
| @@ -18,10 +18,5 @@ class worker(threading.Thread): | ||||
| 			p = self.l.check() | ||||
| #			log.debug("check has returned " + p) | ||||
| 			for i in p: | ||||
| #				print i.message_id, i.flags, i.from_id, i.user_id, i.mask, i.byself, i.message_flags | ||||
| #				if i.flags == 4 or i.flags == 51 or i.flags == 49: | ||||
| 				if i.text != None and i.from_id != None and i.flags != None and i.message_flags != None: | ||||
| #					print i.message_id, i.flags, i.from_id, i.user_id, i.mask, i.byself, i.message_flags | ||||
| #					if i.from_id != None: | ||||
| #					print "ordering sent stuff" | ||||
| 					pub.sendMessage("order-sent-message", obj=i) | ||||
|   | ||||
| @@ -318,7 +318,6 @@ class Controller(object): | ||||
| 			if user_id == None: | ||||
| 				commonMessages.no_user_exist() | ||||
| 				return | ||||
| 			print user_id | ||||
| 			if buffertype == "audio": | ||||
| 				buffer = buffers.audioBuffer(parent=self.window.tb, name="{0}_audio".format(user_id,), composefunc="compose_audio", session=self.session, endpoint="get", parent_endpoint="audio", full_list=True, count=self.session.settings["buffers"]["count_for_audio_buffers"], owner_id=user_id) | ||||
| 				# Translators: {0} will be replaced with an user. | ||||
|   | ||||
| @@ -68,7 +68,6 @@ class postController(object): | ||||
| 		self.worker = threading.Thread(target=self.load_all_components) | ||||
| 		self.worker.finished = threading.Event() | ||||
| 		self.worker.start() | ||||
| #		if self.post.has_key("attachments"): print self.post["attachments"] | ||||
| 		self.attachments = [] | ||||
| 		self.load_images = False | ||||
| 		# We'll put images here, so it will be easier to work with them. | ||||
| @@ -140,7 +139,6 @@ class postController(object): | ||||
| 		# Links in text are not treated like normal attachments, so we'll have to catch and add those to the list without title | ||||
| 		# We can't get a title because title is provided by the VK API and it will not work for links as simple text. | ||||
| 		urls = utils.find_urls_in_text(self.dialog.get("post_view")) | ||||
| 		print urls | ||||
| 		if len(urls) > 0: | ||||
| 			links = [] | ||||
| 			for i in urls: | ||||
| @@ -202,7 +200,6 @@ class postController(object): | ||||
| 		for i in possible_sizes: | ||||
| 			if photo.has_key("photo_{0}".format(i,)) and i == size: | ||||
| 				url = photo["photo_{0}".format(i,)] | ||||
| 				print photo | ||||
| 				break | ||||
| 		return url | ||||
|  | ||||
| @@ -277,7 +274,7 @@ class postController(object): | ||||
| 					self.clear_comments_list() | ||||
| 					self.get_comments() | ||||
| 			except Exception as msg: | ||||
| 				print msg | ||||
| 				log.error(msg) | ||||
|  | ||||
| 	def clear_comments_list(self): | ||||
| 		self.dialog.comments.clear() | ||||
| @@ -369,8 +366,6 @@ class postController(object): | ||||
| 					break | ||||
| 			if url != "": | ||||
| 				webbrowser.open_new_tab(url) | ||||
| 			else: | ||||
| 				print attachment["photo"].keys() | ||||
| 		else: | ||||
| 			log.debug("Unhandled attachment: %r" % (attachment,)) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user