Пример #1
0
def onTransferDenied(strTime, status, message, messagecode):  # done
    logger.info('onTransferDenied')

    if not messagecode:
        db.setUserReplyString(strTime + '|' + status + '|' + message, '')
    else:
        db.setUserReplyString(strTime + '|' + status + '|' + messagecode, '')
Пример #2
0
def onLicenseDisabled(strTime, status, message, messagecode,
                      licenseFile):  # done
    logger.info('onLicenseDisabled')

    if not messagecode:
        db.setUserReplyString(strTime + '|' + status + '|' + message, '')
    else:
        db.setUserReplyString(strTime + '|' + status + '|' + messagecode, '')

    deleteLicenseFile(licenseFile)
    db.hideDisabled(True)
Пример #3
0
def onNoLicense(bDemoLicense, licenseFile, strTime, status, message,
                messagecode):  # done
    logger.info('onNoLicense')

    if not messagecode:
        db.setUserReplyString(strTime + '|' + status + '|' + message, '')
    else:
        db.setUserReplyString(strTime + '|' + status + '|' + messagecode, '')

    if not bDemoLicense:
        deleteLicenseFile(licenseFile)
        db.forseUpdatePrivBasedOnLicensing()
Пример #4
0
def onFailed(productKey, strTime, status, message, messagecode):  # done
    logger.info('onFailed')

    if not productKey:  # no produce key means DEMO:
        # do nothing
        i = 0
    else:
        if not messagecode:
            db.setUserReplyString(strTime + '|' + status + '|' + message, '')
        else:
            db.setUserReplyString(strTime + '|' + status + '|' + messagecode,
                                  '')
Пример #5
0
def onTransferComplete(licenseFile, license, licensecoderm):  # done
    logger.info('onTransferComplete')

    # licenseCodeLcNew = su.getHash(license)

    db.hideDisabled(False)

    saveLicenseFile(licenseFile, license)
    licenseCodeLcNewFile = fu.getHash(licenseFile)
    if licensecoderm != licenseCodeLcNewFile:
        logger.error("Hash code don't match. Received: " + licensecoderm +
                     " from file: " + licenseCodeLcNewFile)

    db.forseUpdatePrivBasedOnLicensing()

    db.setUserReplyString('', '')
Пример #6
0
def onOk():  # done
    logger.info('onOk')
    db.setUserReplyString('', '')