equal
deleted
inserted
replaced
25 except: |
25 except: |
26 msg = u(msg) + u"\n" |
26 msg = u(msg) + u"\n" |
27 if type(msg) is unicode: |
27 if type(msg) is unicode: |
28 msg = codecs.encode(msg, sys.stderr.encoding) |
28 msg = codecs.encode(msg, sys.stderr.encoding) |
29 sys.stderr.write(msg) |
29 sys.stderr.write(msg) |
|
30 |
|
31 |
|
32 def main(): |
|
33 pass |
30 |
34 |
31 optParser = OptionParser() |
35 optParser = OptionParser() |
32 optParser.add_option("-C", "--old-syntax", action="store_true", dest="old_syntax", |
36 optParser.add_option("-C", "--old-syntax", action="store_true", dest="old_syntax", |
33 help="syntax of YML 2 version 1.x (compatibility mode)", default=False) |
37 help="syntax of YML 2 version 1.x (compatibility mode)", default=False) |
34 optParser.add_option("-D", "--emit-linenumbers", action="store_true", dest="emitlinenumbers", |
38 optParser.add_option("-D", "--emit-linenumbers", action="store_true", dest="emitlinenumbers", |
92 w(u"not found: " + u(msg) + u"\n") |
96 w(u"not found: " + u(msg) + u"\n") |
93 sys.exit(4) |
97 sys.exit(4) |
94 except Exception as msg: |
98 except Exception as msg: |
95 w(msg) |
99 w(msg) |
96 sys.exit(5) |
100 sys.exit(5) |
|
101 |
|
102 |
|
103 if __name__ == "__main__": |
|
104 sys.exit(main()) |