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:
		@@ -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>
 | 
			
		||||
	* src/ReportBase/_GraphvizReportDialog.py: Remove unnecessary code.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -62,16 +62,19 @@ def gramps_db_factory(db_type):
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
    if db_type == const.APP_GRAMPS:
 | 
			
		||||
        from _GrampsBSDDB import GrampsBSDDB
 | 
			
		||||
        from gen.db import GrampsBSDDB
 | 
			
		||||
        #from _GrampsBSDDB import GrampsBSDDB
 | 
			
		||||
        cls = GrampsBSDDB
 | 
			
		||||
#    elif db_type == const.APP_GRAMPS_XML:
 | 
			
		||||
#        from _GrampsXMLDB import GrampsXMLDB
 | 
			
		||||
#        cls = GrampsXMLDB
 | 
			
		||||
    elif db_type == const.APP_GEDCOM:
 | 
			
		||||
        from _GrampsGEDDB import GrampsGEDDB
 | 
			
		||||
        from gen.db import GrampsGEDDB
 | 
			
		||||
        #from _GrampsGEDDB import GrampsGEDDB
 | 
			
		||||
        cls = GrampsGEDDB
 | 
			
		||||
    elif db_type == 'x-directory/normal':
 | 
			
		||||
        from _GrampsDBDir import GrampsDBDir
 | 
			
		||||
        from gen.db import GrampsDBDir
 | 
			
		||||
        #from _GrampsDBDir import GrampsGEDDB
 | 
			
		||||
        cls = GrampsDBDir
 | 
			
		||||
    else:
 | 
			
		||||
        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
 | 
			
		||||
        files = os.listdir(tmpdir_path) ;
 | 
			
		||||
        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:
 | 
			
		||||
        archive = tarfile.open(name)
 | 
			
		||||
        for tarinfo in archive:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user