Example #1
0
def cleanup_syntool( key_paths, tmpdir ):
   
   for key_path in key_paths:
      if storage.path_exists( key_path, volume=None ):
         rc = storage.erase_file( key_path, volume=None )
         if not rc:
            log.critical( "!!! FAILED TO ERASE KEY! Securely erase %s !!!" % key_path )

   try:
      shutil.rmtree( tmpdir )
   except Exception, e:
      log.exception(e)
      log.error("Failed to remove %s" % t)
Example #2
0
def delete_gateway_privkey( gateway_name ):
   return storage.erase_file( gateway_privkey_path( gateway_name ), volume=None )