2007-12-16 Douglas S. Blank <dblank@cs.brynmawr.edu>
* src/plugins/ReadPkg.py: attempt to os.remove(directory) failed * src/GrampsDb/_GrampsDbFactories.py: import from gen.db svn: r9520
This commit is contained in:
parent
0ff1e21c46
commit
15b2843d93
@ -1,3 +1,7 @@
|
|||||||
|
2007-12-16 Douglas S. Blank <dblank@cs.brynmawr.edu>
|
||||||
|
* src/plugins/ReadPkg.py: attempt to os.remove(directory) failed
|
||||||
|
* src/GrampsDb/_GrampsDbFactories.py: import from gen.db
|
||||||
|
|
||||||
2007-12-15 Brian Matherly <brian@gramps-project.org>
|
2007-12-15 Brian Matherly <brian@gramps-project.org>
|
||||||
* src/ReportBase/_GraphvizReportDialog.py: Remove unnecessary code.
|
* src/ReportBase/_GraphvizReportDialog.py: Remove unnecessary code.
|
||||||
|
|
||||||
|
@ -62,16 +62,19 @@ def gramps_db_factory(db_type):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if db_type == const.APP_GRAMPS:
|
if db_type == const.APP_GRAMPS:
|
||||||
from _GrampsBSDDB import GrampsBSDDB
|
from gen.db import GrampsBSDDB
|
||||||
|
#from _GrampsBSDDB import GrampsBSDDB
|
||||||
cls = GrampsBSDDB
|
cls = GrampsBSDDB
|
||||||
# elif db_type == const.APP_GRAMPS_XML:
|
# elif db_type == const.APP_GRAMPS_XML:
|
||||||
# from _GrampsXMLDB import GrampsXMLDB
|
# from _GrampsXMLDB import GrampsXMLDB
|
||||||
# cls = GrampsXMLDB
|
# cls = GrampsXMLDB
|
||||||
elif db_type == const.APP_GEDCOM:
|
elif db_type == const.APP_GEDCOM:
|
||||||
from _GrampsGEDDB import GrampsGEDDB
|
from gen.db import GrampsGEDDB
|
||||||
|
#from _GrampsGEDDB import GrampsGEDDB
|
||||||
cls = GrampsGEDDB
|
cls = GrampsGEDDB
|
||||||
elif db_type == 'x-directory/normal':
|
elif db_type == 'x-directory/normal':
|
||||||
from _GrampsDBDir import GrampsDBDir
|
from gen.db import GrampsDBDir
|
||||||
|
#from _GrampsDBDir import GrampsGEDDB
|
||||||
cls = GrampsDBDir
|
cls = GrampsDBDir
|
||||||
else:
|
else:
|
||||||
raise GrampsDbException("Attempt to create unknown "
|
raise GrampsDbException("Attempt to create unknown "
|
||||||
|
@ -82,8 +82,13 @@ def impData(database, name, cb=None, cl=0):
|
|||||||
else: # tempdir exists and writable -- clean it up if not empty
|
else: # tempdir exists and writable -- clean it up if not empty
|
||||||
files = os.listdir(tmpdir_path) ;
|
files = os.listdir(tmpdir_path) ;
|
||||||
for filename in files:
|
for filename in files:
|
||||||
os.remove(os.path.join(tmpdir_path, filename))
|
try:
|
||||||
|
os.remove(os.path.join(tmpdir_path, filename))
|
||||||
|
except OSError:
|
||||||
|
try:
|
||||||
|
os.removedirs(os.path.join(tmpdir_path, filename))
|
||||||
|
except:
|
||||||
|
print "could not remove: '%s'" % os.path.join(tmpdir_path, filename)
|
||||||
try:
|
try:
|
||||||
archive = tarfile.open(name)
|
archive = tarfile.open(name)
|
||||||
for tarinfo in archive:
|
for tarinfo in archive:
|
||||||
|
Loading…
Reference in New Issue
Block a user