Exemple #1
0
        correctEntry = dictFromInput["correctUsernameAndPassword"]
        filePath = dictFromInput["filePath"]

        if (isAdminUser == "True" and correctEntry == "True"):
            adminInput()

        if (isAdminUser == "False" and correctEntry == "True"):

            # change for whatever user / file path is acquired above
            watchMachine.oneDir = filePath
            watchMachine.username = userName
            OneDog.lm.oneDir = filePath
            OneDog.lm.username = userName

            message = "syncOn"
            watchMachine.sendMessage(message)

            watch_process.start()

            # port = whichever port we determine will be the client listening port (1235?)
            listenMachine.dir_path = filePath
            reactor.listenTCP(listenMachine.listen_port, listenMachine)

            listen_process = Process(target=reactor.run)
            listen_process.start()

            while True:
                syncState = syncOptions(syncState)

        if (correctEntry == "False"):
            print "Incorrect username or password"