Ejemplo n.º 1
0
Archivo: sync.py Proyecto: stfp/qostool
 def save_state(self):
     state_file_name = self.config.root + "/state/sync.state"
     logging.debug("Saving state in %s", state_file_name)
     util.makedirs_for_file(state_file_name)
     outfile = open(state_file_name, "wb")
     cPickle.dump(self.state, outfile)
     outfile.close()        
Ejemplo n.º 2
0
    def save(self, workset, filename):
        logging.debug("WorkSetManager: saving %s" % (filename))
        
        util.makedirs_for_file(filename)

        outfile = gzip.GzipFile(filename, "wb+", 5)
        cPickle.dump(workset, outfile)
        outfile.close()