| 28 | |
| 29 | |
| 30 | def 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 | |
| 48 | print header |