Exemplo n.º 1
0
def getMsgDxDirect(msgId, sl, fileName):
    storage = DXStorage(sl.getServer(), sl.getUserName(), sl.getPassword(), sl.getDomain(), "email", True, sl.getManagementServer())
    out = FileOutputStream(fileName)
    response = storage.read(str(msgId), out)
    out.flush()
    out.close()

    if not response.isSuccessful():
        printErrorToRemigrate(msgId, " from DX")
        return False
    else:
        return True
Exemplo n.º 2
0
def getMsgDxDirect(someMsgId, sl, fileName, threadName):
    printQueue.add("debug("+ threadName +"): entering getMsgDxDirect() with someMsgId = " + str(someMsgId))
    storage = DXStorage(sl.getServer(), sl.getUserName(), sl.getPassword(), sl.getDomain(), "email", True, sl.getManagementServer())
    out = FileOutputStream(fileName)
    response = storage.read(str(someMsgId), out)
    printQueue.add("debug("+ threadName +"): dx response is " + str(response.toString()) + " with someMsgId = " + str(someMsgId))
    out.flush()
    out.close()

    if not response.isSuccessful():
        printErrorToRemigrate(someMsgId, " from DX")
        return False
    else:
        printQueue.add("debug("+ threadName +"): exiting successfully getMsgDxDirect() with someMsgId = " + str(someMsgId))
        return True