3798: tempfile wrongly used in Gramps: possible error 'Too many open files: ...'
svn: r15199
This commit is contained in:
parent
92dd34a742
commit
2a66d6b648
@ -42,10 +42,10 @@ from gettext import gettext as _
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
PROGRAM_NAME = "Gramps"
|
PROGRAM_NAME = "Gramps"
|
||||||
if "@VERSIONSTRING@" == "@" + "VERSIONSTRING" + "@":
|
if "@VERSIONSTRING@" == "@" + "VERSIONSTRING" + "@":
|
||||||
VERSION = "3.2.0"
|
VERSION = "3.2.1"
|
||||||
else:
|
else:
|
||||||
VERSION = "@VERSIONSTRING@"
|
VERSION = "@VERSIONSTRING@"
|
||||||
VERSION_TUPLE = (3, 2, 0)
|
VERSION_TUPLE = (3, 2, 1)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -2652,7 +2652,8 @@ def importData(database, filename, callback=None, cl=0):
|
|||||||
# Since we don't want to modify the file being imported,
|
# Since we don't want to modify the file being imported,
|
||||||
# we create new temp file into which we will copy the imported file
|
# we create new temp file into which we will copy the imported file
|
||||||
orig_filename = os.path.normpath(filename)
|
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()
|
new_env_name = tempfile.mkdtemp()
|
||||||
|
|
||||||
# determine old env dir and make db work with new env dir
|
# determine old env dir and make db work with new env dir
|
||||||
|
Loading…
Reference in New Issue
Block a user