PureDocs

Changeset 239


Ignore:
Timestamp:
02/23/08 07:08:10 (4 years ago)
Author:
will
Message:

Bug fixes for the XSLTransformer (ignore resource-directory-exists errors with just a warning) and the Resource class (resource types weren't being added to the XML)

Location:
trunk/src/core/puredocs/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/puredocs/core/chain.py

    r237 r239  
    280280        # XXX: Again, since we're chunking, just use outpath. 
    281281        # Otherwise, we'd need some checks here. 
    282         shutil.copytree(self.resources, os.path.join(outpath, "resources")) 
     282        try: 
     283            shutil.copytree(self.resources, os.path.join(outpath, "resources")) 
     284        except OSError: 
     285            # XXX: This is probably a file exists error.  Not entirely 
     286            # sure what to do here.  Right now, we'll assume that the 
     287            # file exists because the resources are already there. 
     288            # In the future, it might be necessary to use a more robust 
     289            # API than shutils to check the contents of an existing file 
     290            # and do whatever appropriate 
     291            self.logger.warning("Resources directory (%s) already exists." 
     292                    "Not copying." % os.path.join(outpath, "resources")) 
    283293 
    284294        # Do this so that this plugin passes silently.  It doesn't 
  • trunk/src/core/puredocs/core/resource.py

    r237 r239  
    9090            # Create our element within the PureDocs namespace 
    9191            self.__element = NSElement("resource", "puredocs") 
     92            self.__element.set("type", unicode(type)) 
    9293            self.__element.set("mimetype", mimetype) 
    9394            self.doc = doc 
Note: See TracChangeset for help on using the changeset viewer.