From 7e5e5db27f63f59e1f317978b574b34736492b22 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sat, 17 Apr 2010 23:20:01 +0000 Subject: [PATCH] 3798: tempfile wrongly used in Gramps: possible error 'Too many open files: ...' svn: r15201 --- src/plugins/import/ImportGrdb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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