changeset 334:9c6be29c714a

browser side: removed logging imports: it's not working correctly with pyjamas
author Goffi <goffi@goffi.org>
date Tue, 04 Feb 2014 16:49:20 +0100
parents c01397d18026
children e8c26e24a6c7
files browser_side/base_widget.py browser_side/card_game.py browser_side/panels.py
diffstat 3 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/browser_side/base_widget.py	Tue Feb 04 16:49:20 2014 +0100
+++ b/browser_side/base_widget.py	Tue Feb 04 16:49:20 2014 +0100
@@ -40,7 +40,6 @@
 from __pyjamas__ import doc
 
 import dialog
-import logging
 from tools import LiberviaDragWidget
 
 
@@ -215,7 +214,7 @@
         while current is not None and not isinstance(current, class_):
             current = Widget.getParent(current)
         if current is None and verbose:
-            logging.error("Can't find parent %s for %s" % (class_, self))
+            print "Can't find parent %s for %s" % (class_, self)
         return current
 
     def onClick(self, sender):
--- a/browser_side/card_game.py	Tue Feb 04 16:49:20 2014 +0100
+++ b/browser_side/card_game.py	Tue Feb 04 16:49:20 2014 +0100
@@ -43,7 +43,6 @@
 from datetime import datetime
 from time import time
 from sat_frontends.tools.games import TarotCard
-from logging import error
 import re
 
 
@@ -308,7 +307,7 @@
         elif phase == "ecart":
             self.state = "ecart"
         else:
-            error('INTERNAL ERROR: unmanaged game phase')
+            print 'INTERNAL ERROR: unmanaged game phase'
 
         for suit, value in played_cards:
             self.hand.append(self.cards[(suit, value)])
--- a/browser_side/panels.py	Tue Feb 04 16:49:20 2014 +0100
+++ b/browser_side/panels.py	Tue Feb 04 16:49:20 2014 +0100
@@ -58,8 +58,6 @@
 from sat_frontends.tools.games import SYMBOLS
 from sat_frontends.tools.strings import addURLToText
 
-import logging
-
 
 class UniBoxPanel(HorizontalPanel):
     """Panel containing the UniBox"""
@@ -357,7 +355,7 @@
                 self.node = data['comments_node'] if self.comments else data['node']
                 self.hash = (self.service, self.node)
             except KeyError:
-                logging.error("Warning: can't manage item [%s] some keys are missing in microblog data (%s)" % (self.id, data.keys()))
+                print "Warning: can't manage item [%s] some keys are missing in microblog data (%s)" % (self.id, str(data))
                 self.comments = False
 
 
@@ -843,7 +841,7 @@
         try:
             self.vpanel.getParent().ensureVisible(entry)  # scroll to the clicked entry
         except AttributeError:
-            logging.error("FIXME: MicroblogPanel.vpanel should be wrapped in a ScrollPanel!")
+            print "FIXME: MicroblogPanel.vpanel should be wrapped in a ScrollPanel!"
         removeStyle = lambda entry: entry.removeStyleName('selected_entry')
         if not self.host.uni_box or not entry.comments:
             entry.addStyleName('selected_entry')  # blink the clicked entry