* src/ArgHandler.py, src/DbLoader.py: Print out more precise error messages when trying to open gpkg or geneweb files.
svn: r7953
This commit is contained in:
parent
b943028eb9
commit
94fc96718f
@ -1,3 +1,8 @@
|
|||||||
|
2007-01-22 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
|
* src/ArgHandler.py,
|
||||||
|
* src/DbLoader.py: Print out more precise error messages when trying
|
||||||
|
to open gpkg or geneweb files.
|
||||||
|
|
||||||
2007-01-21 Don Allingham <don@gramps-project.org>
|
2007-01-21 Don Allingham <don@gramps-project.org>
|
||||||
* src/GrampsDb/_GrampsDBCallback.py: sys.getfilesystemencoding()
|
* src/GrampsDb/_GrampsDBCallback.py: sys.getfilesystemencoding()
|
||||||
* src/GrampsDb/_GrampsBSDDB.py: sys.getfilesystemencoding()
|
* src/GrampsDb/_GrampsBSDDB.py: sys.getfilesystemencoding()
|
||||||
|
@ -153,6 +153,11 @@ class ArgHandler:
|
|||||||
format = 'gramps-xml'
|
format = 'gramps-xml'
|
||||||
elif ftype == const.app_gramps:
|
elif ftype == const.app_gramps:
|
||||||
format = 'grdb'
|
format = 'grdb'
|
||||||
|
elif ftype in [const.app_gramps_package,const.app_geneweb]:
|
||||||
|
print 'Unsupported type: "%s" for input file: %s' \
|
||||||
|
% (ftype,fname)
|
||||||
|
print 'Please create a new GRAMPS database and import the file.'
|
||||||
|
continue
|
||||||
else:
|
else:
|
||||||
print 'Unrecognized type: "%s" for input file: %s' \
|
print 'Unrecognized type: "%s" for input file: %s' \
|
||||||
% (ftype,fname)
|
% (ftype,fname)
|
||||||
|
@ -118,6 +118,13 @@ class DbLoader:
|
|||||||
except:
|
except:
|
||||||
return ('','')
|
return ('','')
|
||||||
return (filename,filetype)
|
return (filename,filetype)
|
||||||
|
elif filetype in [const.app_gramps_package,const.app_geneweb]:
|
||||||
|
QuestionDialog.ErrorDialog(
|
||||||
|
_("Could not open file: %s") % filename,
|
||||||
|
_('Files of type "%s" cannot be opened directly.\n\n'
|
||||||
|
'Please create a new GRAMPS database and import '
|
||||||
|
'the file.') % filetype)
|
||||||
|
return ('','')
|
||||||
else:
|
else:
|
||||||
QuestionDialog.ErrorDialog(
|
QuestionDialog.ErrorDialog(
|
||||||
_("Could not open file: %s") % filename,
|
_("Could not open file: %s") % filename,
|
||||||
|
Loading…
Reference in New Issue
Block a user