From 2a66d6b648712065533723e7c57c3d04b148e8f6 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sat, 17 Apr 2010 23:16:36 +0000 Subject: [PATCH] 3798: tempfile wrongly used in Gramps: possible error 'Too many open files: ...' svn: r15199 --- src/const.py.in | 4 ++-- src/plugins/import/ImportGrdb.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/const.py.in b/src/const.py.in index fbb911cef..04bd899e2 100644 --- a/src/const.py.in +++ b/src/const.py.in @@ -42,10 +42,10 @@ from gettext import gettext as _ #------------------------------------------------------------------------- PROGRAM_NAME = "Gramps" if "@VERSIONSTRING@" == "@" + "VERSIONSTRING" + "@": - VERSION = "3.2.0" + VERSION = "3.2.1" else: VERSION = "@VERSIONSTRING@" -VERSION_TUPLE = (3, 2, 0) +VERSION_TUPLE = (3, 2, 1) #------------------------------------------------------------------------- # diff --git a/src/plugins/import/ImportGrdb.py b/src/plugins/import/ImportGrdb.py index 6fdd26923..48ce5c046 100644 --- a/src/plugins/import/ImportGrdb.py +++ b/src/plugins/import/ImportGrdb.py @@ -2652,7 +2652,8 @@ def importData(database, filename, callback=None, cl=0): # Since we don't want to modify the file being imported, # we create new temp file into which we will copy the imported file orig_filename = os.path.normpath(filename) - new_filename = tempfile.mkstemp()[1] + new_file_id, new_filename = tempfile.mkstemp() + os.close(new_file_id) new_env_name = tempfile.mkdtemp() # determine old env dir and make db work with new env dir