From bc2ef71467e4dd381571dac63284c02f67e13848 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Sat, 21 Apr 2007 02:50:11 +0000 Subject: [PATCH] 2007-04-20 Alex Roitman * src/plugins/Checkpoint.py (Checkpoint.rcs): Remove debugging output; Work out retrieval. svn: r8411 --- gramps2/ChangeLog | 4 ++++ gramps2/src/plugins/Checkpoint.py | 19 ++++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 24a4d17ae..f6f16f985 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2007-04-20 Alex Roitman + * src/plugins/Checkpoint.py (Checkpoint.rcs): Remove debugging + output; Work out retrieval. + 2007-04-20 Don Allingham * src/DisplayModels/_BaseModel.py (BaseModel.add_row_by_handle): if search not defined, do an insert diff --git a/gramps2/src/plugins/Checkpoint.py b/gramps2/src/plugins/Checkpoint.py index 7e175612f..eda2869a1 100644 --- a/gramps2/src/plugins/Checkpoint.py +++ b/gramps2/src/plugins/Checkpoint.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2006 Donald N. Allingham +# Copyright (C) 2000-2007 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -325,7 +325,7 @@ class Checkpoint(Tool.Tool, ManagedWindow.ManagedWindow): xmlwrite.write(archive_base) cmd = ["ci", archive_base] - print cmd + # print cmd proc = subprocess.Popen( cmd, @@ -344,7 +344,7 @@ class Checkpoint(Tool.Tool, ManagedWindow.ManagedWindow): dialog = ErrorDialog else: msg1 = archive_success_msg[0] - msg2 = archive_success_msg[1] + msg2 = archive_success_msg[1] dialog = OkDialog if cli: @@ -353,13 +353,18 @@ class Checkpoint(Tool.Tool, ManagedWindow.ManagedWindow): else: dialog(msg1,msg2) else: - + output = archive_base + ".checkpoint.gramps" + fd = open(output,'wt') + + cmd = ("co", "-p", archive_base) proc = subprocess.Popen( - ("co", "-p", archive_base), stdout=subprocess.PIPE, - stderr = subprocess.PIPE ) + cmd, + stdout = fd, + stderr = subprocess.PIPE ) status = proc.wait() message = "\n".join(proc.stderr.readlines()) proc.stderr.close() + fd.close() del proc if status: @@ -368,7 +373,7 @@ class Checkpoint(Tool.Tool, ManagedWindow.ManagedWindow): dialog = ErrorDialog else: msg1 = retrieve_success_msg[0] - msg2 = retrieve_success_msg[1] + msg2 = retrieve_success_msg[1] + "\n\t" + output dialog = OkDialog if cli: