From ee13c47370de9739e7b0375c19d9682991ab51b9 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Tue, 20 May 2003 18:33:14 +0000 Subject: [PATCH] Command line export-> default to gramps svn: r1549 --- gramps2/src/gramps_main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py index b32754c9c..f480edd02 100755 --- a/gramps2/src/gramps_main.py +++ b/gramps2/src/gramps_main.py @@ -182,7 +182,13 @@ class Gramps: outformat = 'gedcom' elif string.upper(outfname[-3:]) == "TGZ": outformat = 'gramps-pkg' - elif os.path.isdir(outfname): + elif not os.path.isfile(outfname): + if not os.path.isdir(outfname): + try: + os.makedirs(outfname,0700) + except: + print "Cannot create directory %s" % outfname + os._exit(1) outformat = 'gramps' else: print "Unrecognized format for output file %s" % outfname