[kupfer: 9/10] Reduce debug output when starting programs



commit f9a26b0462939d5a8aa6d76de633ecf3f5cb179e
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Thu Mar 31 18:49:22 2011 +0200

    Reduce debug output when starting programs

 kupfer/desktop_launch.py |    5 +----
 kupfer/launch.py         |    2 --
 kupfer/utils.py          |    2 +-
 3 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/kupfer/desktop_launch.py b/kupfer/desktop_launch.py
index 3cde126..1f5aa96 100644
--- a/kupfer/desktop_launch.py
+++ b/kupfer/desktop_launch.py
@@ -362,7 +362,6 @@ def spawn_app(app_info, argv, filelist, workdir=None, startup_notify=True,
 		child_env_add = {}
 	if screen:
 		child_env_add["DISPLAY"]=screen.make_display_name()
-	debug_log(child_env_add)
 
 	if not workdir or not os.path.exists(workdir):
 		workdir = "."
@@ -370,14 +369,12 @@ def spawn_app(app_info, argv, filelist, workdir=None, startup_notify=True,
 	argv = list(locale_encode_argv(argv))
 
 	try:
-		debug_log("Launching", argv)
-		debug_log("Startup Notify ID:", notify_id)
 		(pid, _ig1, _ig2, _ig3) = glib.spawn_async(argv,
 		                       working_directory=workdir,
 		                       flags=glib.SPAWN_SEARCH_PATH,
 		                       child_setup=child_setup,
 		                       user_data=child_env_add)
-		debug_log("Launched child with PID", pid)
+		debug_log("Launched", argv,  notify_id, "pid:", pid)
 	except glib.GError as exc:
 		error_log("Error Launching ", argv, unicode(exc))
 		if notify_id:
diff --git a/kupfer/launch.py b/kupfer/launch.py
index 987e3c0..5eaef9b 100644
--- a/kupfer/launch.py
+++ b/kupfer/launch.py
@@ -73,9 +73,7 @@ def launch_application(app_info, files=(), uris=(), paths=(), track=True,
 
 	# An launch callback closure for the @app_id
 	def application_launch_callback(argv, pid, notify_id, files, timestamp):
-		pretty.print_debug(__name__, "Launched", argv, pid, notify_id, files)
 		is_terminal = terminal.is_known_terminal_executable(argv[0])
-		pretty.print_debug(__name__, argv, "is terminal:", is_terminal)
 		if not is_terminal:
 			svc.launched_application(app_id, pid)
 
diff --git a/kupfer/utils.py b/kupfer/utils.py
index a9e6eff..02a786e 100644
--- a/kupfer/utils.py
+++ b/kupfer/utils.py
@@ -229,8 +229,8 @@ def spawn_async_raise(argv, workdir="."):
 
 	raises SpawnError
 	"""
-	pretty.print_debug(__name__, "Spawn Async", argv, workdir)
 	argv = _argv_to_locale(argv)
+	pretty.print_debug(__name__, "spawn_async", argv, workdir)
 	try:
 		return gobject.spawn_async (argv, working_directory=workdir,
 				flags=gobject.SPAWN_SEARCH_PATH)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]