-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbundle.tar
82 lines (71 loc) · 30 KB
/
bundle.tar
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
./payload/GF.py 0000644 0001750 0001750 00000001324 11575023325 013333 0 ustar madmaze madmaze import os
import sys
import time
import CLnode
#######################
# 0 = none
# 1 = info
# 2 = debug
logLevel=0
######################
nodes=[]
reqests=[]
def run(cmd):
f=os.popen(cmd)
buf=""
for i in f.readlines():
buf+=i
return buf.strip()
def log(msg, lvl):
if logLevel >= lvl:
print msg
def addNewNodes(new):
for n in new:
exists=instExists(n)
if exists>=0:
nodes[exists]=n.copy()
else:
nodes.append(n)
def instExists(node):
cnt=0
for n in nodes:
if n.instID==node.instID:
return cnt;
cnt+=1
return -1
def confirmQuestion(Question):
var=""
while var != "y" and var != "n":
var = raw_input(Question + " (y/n):" )
if var == "y":
return True
else:
return False