2006-12-15 Don Allingham <don@gramps-project.org>

* src/GrampsDb/_ReadGedcom.py (import2): import a readonly file properly



svn: r7806
This commit is contained in:
Don Allingham 2006-12-16 03:47:03 +00:00
parent e98d2a0825
commit ba6255ae09
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,6 @@
2006-12-15 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_ReadGedcom.py (import2): import a readonly file properly (bug #765)
2006-12-15 Martin Hawlisch <Martin.Hawlisch@gmx.de> 2006-12-15 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/Editors/_EditSourceRef.py, * src/Editors/_EditSourceRef.py,
* src/Editors/_EditRepoRef.py, * src/Editors/_EditRepoRef.py,

View File

@ -239,7 +239,10 @@ def import2(database, filename, callback, codeset, use_trans):
use_trans = False use_trans = False
try: try:
ro = database.readonly
database.readonly = False
close = g.parse_gedcom_file(use_trans) close = g.parse_gedcom_file(use_trans)
database.readonly = ro
except IOError,msg: except IOError,msg:
errmsg = _("%s could not be opened\n") % filename errmsg = _("%s could not be opened\n") % filename
ErrorDialog(errmsg,str(msg)) ErrorDialog(errmsg,str(msg))