コード例 #1
0
ファイル: rhn_ssl_dbstore.py プロジェクト: T-D-Oe/spacewalk
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)
コード例 #2
0
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
コード例 #3
0
ファイル: rhn_ssl_dbstore.py プロジェクト: lpramuk/spacewalk
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)
コード例 #4
0
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