Ejemplo n.º 1
0
 def _saveTemp(self, filename, passphrase, dumpFunc):
     f = open(filename, "wb")
     if passphrase is None:
         dumpFunc(self.original, f)
     else:
         s = StringIO.StringIO()
         dumpFunc(self.original, s)
         f.write(_encrypt(passphrase, s.getvalue()))
     f.close()
Ejemplo n.º 2
0
 def _saveTemp(self, filename, passphrase, dumpFunc):
     f = open(filename, 'wb')
     if passphrase is None:
         dumpFunc(self.original, f)
     else:
         s = StringIO.StringIO()
         dumpFunc(self.original, s)
         f.write(_encrypt(passphrase, s.getvalue()))
     f.close()