[gnome-games/sudoku-tube] No need to output these things to user?
- From: Zhang Sen <zhangsen src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-games/sudoku-tube] No need to output these things to user?
- Date: Tue, 11 Aug 2009 11:52:47 +0000 (UTC)
commit 77d98d1ad662d2ed93a89b75ed7ffabe8796a0ed
Author: Zhang Sen <zh jesse gmail com>
Date: Tue Aug 11 18:22:37 2009 +0800
No need to output these things to user?
logger.info->debug
gnome-sudoku/src/lib/contact_selector.py | 2 +-
gnome-sudoku/src/lib/main.py | 22 +++++++++++-----------
gnome-sudoku/src/lib/tp_tube.py | 8 ++++----
gnome-sudoku/src/lib/tube_handler.py | 8 ++++----
4 files changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/gnome-sudoku/src/lib/contact_selector.py b/gnome-sudoku/src/lib/contact_selector.py
index 175681b..e8c8ed6 100644
--- a/gnome-sudoku/src/lib/contact_selector.py
+++ b/gnome-sudoku/src/lib/contact_selector.py
@@ -61,7 +61,7 @@ class ContactList:
self._conn.call_when_ready(self._connection_ready_cb)
def _connection_ready_cb(self, conn):
- logger.info("Connection is ready: %s" % conn.service_name)
+ logger.debug("Connection is ready: %s" % conn.service_name)
# TODO react to connection status change
if CONNECTION_INTERFACE_SIMPLE_PRESENCE not in conn:
diff --git a/gnome-sudoku/src/lib/main.py b/gnome-sudoku/src/lib/main.py
index 1f55da7..2327f26 100644
--- a/gnome-sudoku/src/lib/main.py
+++ b/gnome-sudoku/src/lib/main.py
@@ -117,7 +117,7 @@ class SudokuGame(gconf_wrapper.GConfWrapper):
if saved_games:
return saved_games[0]
else:
- logger.info("no saved game found")
+ logger.debug("no saved game found")
return None
def _auto_load_new(self):
@@ -127,7 +127,7 @@ class SudokuGame(gconf_wrapper.GConfWrapper):
new_puzzle = self.sudoku_maker.get_puzzles(1, [level])
if new_puzzle:
# new_puzzle is a list, with the form of (<puzzle>, <difficulty>)
- logger.info("%s game generated" % level)
+ logger.debug("%s game generated" % level)
return new_puzzle[0][0]
else:
logger.warning("failed to genereate new puzzle")
@@ -417,7 +417,7 @@ class SudokuGame(gconf_wrapper.GConfWrapper):
if self._is_initiator:
i_win = True
- logger.info('signal receiver that they fail')
+ logger.debug('signal receiver that they fail')
self._peer.acknowledge_win(
reply_handler=reply_handler,
error_handler=error_handler)
@@ -425,7 +425,7 @@ class SudokuGame(gconf_wrapper.GConfWrapper):
assert self._peer is not None
if not self._peer.has_won():
i_win = True
- logger.info('signal initiator that they fail')
+ logger.debug('signal initiator that they fail')
self._peer.acknowledge_win(
reply_handler=reply_handler,
error_handler=error_handler)
@@ -455,7 +455,7 @@ class SudokuGame(gconf_wrapper.GConfWrapper):
choice = contact_selector.contact_selector_run(self.w)
if choice:
conn, handle, contact = choice
- logger.info("selected: %s\n connection: %s\n handle: %d" % (
+ logger.debug("selected: %s\n connection: %s\n handle: %d" % (
contact.alias, conn.service_name, handle))
self._tube_offer = tp_tube.TubeOffer(conn, handle,
self._tube_service)
@@ -476,7 +476,7 @@ class SudokuGame(gconf_wrapper.GConfWrapper):
self._is_waiting_for_response = True
self._wait_dialog.run()
else:
- logger.info("None selected")
+ logger.debug("None selected")
def _wait_dialog_response_cb(self, dialog, response_id):
if self._is_waiting_for_response:
@@ -526,7 +526,7 @@ class SudokuGame(gconf_wrapper.GConfWrapper):
error_handler=error_cb)
def _got_remote_puzzle_cb(self, puzzle):
- logger.info("got puzzle: %s; type: %s" % (puzzle, type(puzzle)))
+ logger.debug("got puzzle: %s; type: %s" % (puzzle, type(puzzle)))
puzzle = str(puzzle)
assert len(puzzle) == 81
self._open_game(game_selector.NewOrSavedGameSelector.NEW_GAME, puzzle)
@@ -572,11 +572,11 @@ class SudokuGame(gconf_wrapper.GConfWrapper):
# First export our own side-grid-view on dbus
proxy_of_side_view = networking.SideViewProxy(bus, our_obj_path,
self._side_grid_vew)
- logger.info("exported side-view on dbus")
+ logger.debug("exported side-view on dbus")
# Then fetch our peer's side-grid-view
_remote_view_proxy = bus.get_object(object_path=peer_obj_path)
- logger.info("got a remote view which we can manipulate")
+ logger.debug("got a remote view which we can manipulate")
# we issue command on remote_view_handler, which will communicate with
# remote_view
view_handler = networking.RemoteViewHandler(_remote_view_proxy)
@@ -624,10 +624,10 @@ class SudokuGame(gconf_wrapper.GConfWrapper):
self._side_grid_vew.reset()
self._side_grid_vew.hide()
self._tube = None
- logger.info("tube has been closed")
+ logger.debug("tube has been closed")
def _stop_network_game(self, *args):
- logger.info("close tube-channel")
+ logger.debug("close tube-channel")
self._tube[tp_tube.CHANNEL_INTERFACE].Close()
self._side_grid_vew.reset()
self._side_grid_vew.hide()
diff --git a/gnome-sudoku/src/lib/tp_tube.py b/gnome-sudoku/src/lib/tp_tube.py
index e7d12c9..c4bc295 100644
--- a/gnome-sudoku/src/lib/tp_tube.py
+++ b/gnome-sudoku/src/lib/tp_tube.py
@@ -45,16 +45,16 @@ class TubeOffer(gobject.GObject):
def _tube_state_changed_cb(self, state):
self._tube_state = state
if state == TUBE_CHANNEL_STATE_OPEN:
- logger.info("Tube state changed ->open")
+ logger.debug("Tube state changed ->open")
tube_conn = dbus.connection.Connection(self._address)
self.emit("offer-succeeded", tube_conn, self._chan)
elif state == TUBE_CHANNEL_STATE_REMOTE_PENDING:
- logger.info("Tube state changed ->remote-pending")
+ logger.debug("Tube state changed ->remote-pending")
else:
- logger.info("Tube state changed ->%s" % state)
+ logger.debug("Tube state changed ->%s" % state)
def _tube_closed_cb(self):
- logger.info("Tube closed")
+ logger.debug("Tube closed")
if self._tube_state == TUBE_CHANNEL_STATE_REMOTE_PENDING:
# if tube is already open, it's not _offer_ failed (it's other
# problems)
diff --git a/gnome-sudoku/src/lib/tube_handler.py b/gnome-sudoku/src/lib/tube_handler.py
index e39b5eb..e2f1794 100644
--- a/gnome-sudoku/src/lib/tube_handler.py
+++ b/gnome-sudoku/src/lib/tube_handler.py
@@ -32,7 +32,7 @@ class TubeHandler(dbus.service.Object):
"""Listen to coming tube and emit a signal for it"""
def __init__(self, service_name, tube_received_cb):
- logger.info("creating TubeHandler")
+ logger.debug("creating TubeHandler")
self._tube_received_cb = tube_received_cb
bus_name = _build_bus_name(service_name)
@@ -49,7 +49,7 @@ class TubeHandler(dbus.service.Object):
in_signature='soouu', out_signature='')
def HandleTube(self, bus_name, connection, channel, handle_type, handle):
"""Called when we are offered a tube"""
- logger.info("Tube received on %s" % channel)
+ logger.debug("Tube received on %s" % channel)
conn = Connection(bus_name, connection)
self._tube_chan = Channel(bus_name, channel)
@@ -60,9 +60,9 @@ class TubeHandler(dbus.service.Object):
def _tube_state_changed_cb(self, state):
if state == TUBE_STATE_OPEN:
- logger.info("Tube state changed ->open")
+ logger.debug("Tube state changed ->open")
tube_conn = dbus.connection.Connection(self.address)
self._tube_received_cb(tube_conn, self._tube_chan)
else:
- logger.info("Tube state changed ->%s" % state)
+ logger.debug("Tube state changed ->%s" % state)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]