def main(): """ main routine 10 CA certificate not found 11 DB initialization failure 12 no Organization ID. Something very bad is going on. 13 Couldn't insert the certificate for whatever reason. """ values = processCommandline() def writeError(e): sys.stderr.write('\nERROR: %s\n' % e) try: satCerts.store_rhnCryptoKey(values.label, values.ca_cert, verbosity=values.verbose) except satCerts.NoOrgIdError, e: writeError("no organization ID!?!\n\n%s\n" % rhnTB.fetchTraceback()) sys.exit(12)
def main(): """ main routine 10 CA certificate not found 11 DB initialization failure 13 Couldn't insert the certificate for whatever reason. """ values = processCommandline() def writeError(e): sys.stderr.write('\nERROR: %s\n' % e) try: satCerts.store_rhnCryptoKey(values.label, values.ca_cert, verbosity=values.verbose) except satCerts.CaCertInsertionError: writeError("Cannot insert certificate into DB!\n\n%s\n" % rhnTB.fetchTraceback()) sys.exit(13) return 0