blob: be9b0cba6527f196e44f5203e42bc350a1b48540 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
import os
import time
import threading
from leap.app import main as leap_client
from thandy.ClientCLI import update as thandy_update
class Thandy(threading.Thread):
def run(self):
while True:
try:
os.environ["THANDY_HOME"] = os.path.join(os.getcwd(),
"config",
"thandy")
os.environ["THP_DB_ROOT"] = os.path.join(os.getcwd(),
"packages")
os.environ["THP_INSTALL_ROOT"] = os.path.join(os.getcwd(),
"updates")
args = [
"--repo=repo/",
"--debug", # TODO: remove debug
"--install",
"/bundleinfo/LEAPClient/"
]
thandy_update(args)
except Exception as e:
print "ERROR1:", e
finally:
time.sleep(60)
if __name__ == "__main__":
thandy_thread = Thandy()
thandy_thread.daemon = True
thandy_thread.start()
leap_client()
|