From 54a6eeb818654f8586ecfbd776766ebcc5aeee97 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Wed, 19 Jul 2006 04:56:41 +0000 Subject: [PATCH] * src/ArgHandler.py (ArgHandler.cl_export): Properly expand filename. * src/GrampsDb/_WriteGrdb.py (exportData): Use placeholder if callback is None. svn: r7042 --- ChangeLog | 3 +++ src/ArgHandler.py | 1 + src/GrampsDb/_WriteGrdb.py | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 09f3af688..becf69064 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ 2006-07-18 Alex Roitman + * src/ArgHandler.py (ArgHandler.cl_export): Properly expand filename. + * src/GrampsDb/_WriteGrdb.py (exportData): Use placeholder if + callback is None. * src/GrampsDb/_GrampsBSDDB.py (_delete_primary_from_reference_map): defer deleting until the cursor is closed. diff --git a/src/ArgHandler.py b/src/ArgHandler.py index 3be99cbeb..af54b2f2a 100644 --- a/src/ArgHandler.py +++ b/src/ArgHandler.py @@ -543,6 +543,7 @@ class ArgHandler: Try to write into filename using the format. Any errors will cause the os._exit(1) call. """ + filename = os.path.abspath(os.path.expanduser(filename)) if format == 'grdb': try: GrampsDb.gramps_db_writer_factory(const.app_gramps)( diff --git a/src/GrampsDb/_WriteGrdb.py b/src/GrampsDb/_WriteGrdb.py index 5151d282c..16cc63692 100644 --- a/src/GrampsDb/_WriteGrdb.py +++ b/src/GrampsDb/_WriteGrdb.py @@ -44,8 +44,14 @@ from _DbUtils import db_copy # Importing data into the currently open database. # #------------------------------------------------------------------------- +def cli_callback(val): + pass + def exportData(database, filename, person=None, callback=None, cl=False): + if callback == None: + callback = cli_callback + filename = os.path.normpath(filename) new_database = GrampsBSDDB() try: