MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / processDirective

Function processDirective

tools/translateConfig.py:30–45  ·  view source on GitHub ↗
(dirLine)

Source from the content-addressed store, hash-verified

28
29
30def processDirective(dirLine):
31 (directive,key) = dirLine.split(' ')
32 if directive=="static":
33 if key not in knownKeys:
34 print "non-existant key",key,"cannot be static"
35 sys.exit()
36 print "UPDATE CONFIG SET STATIC=1 WHERE KEYSTRING==\""+key+"\";"
37 return
38 if directive=="optional":
39 if key not in knownKeys:
40 print "INSERT INTO CONFIG (KEYSTRING,OPTIONAL) VALUES (\""+key+"\",1);"
41 return
42 print "UPDATE CONFIG SET OPTIONAL=1 WHERE KEYSTRING==\""+key+"\";"
43 return
44 print "unknown directive",directive
45 sys.exit()
46
47
48print header

Callers 1

translateConfig.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected