def _lobUpdate_rhnCryptoKey(rhn_cryptokey_id, cert): """ writes/updates the cert as a lob """ # Use our update blob wrapper to accomodate differences between Oracle # and PostgreSQL: h = rhnSQL.cursor() try: h.update_blob("rhnCryptoKey", "key", "WHERE id = :rhn_cryptokey_id", cert, rhn_cryptokey_id=rhn_cryptokey_id) except: # didn't go in! raise_with_tb(CaCertInsertionError("ERROR: CA certificate failed to be " "inserted into the database"), sys.exc_info()[2])