]>
Commit | Line | Data |
---|---|---|
a6dccbc0 MT |
1 | #!/usr/bin/python |
2 | ||
3 | import sys | |
a6dccbc0 MT |
4 | import naoki |
5 | ||
0c294e96 MT |
6 | # silence Python 2.6 buggy warnings about Exception.message |
7 | if sys.version_info[:2] == (2, 6): | |
8 | import warnings | |
9 | warnings.filterwarnings( | |
10 | action="ignore", | |
11 | message="BaseException.message has been deprecated as of Python 2.6", | |
12 | category=DeprecationWarning) | |
13 | ||
928cd119 MT |
14 | # Initialize system |
15 | n = naoki.Naoki() | |
a6dccbc0 MT |
16 | |
17 | try: | |
928cd119 MT |
18 | # Run... |
19 | n.run() | |
0c294e96 | 20 | exitStatus = 0 |
a6dccbc0 MT |
21 | |
22 | except (SystemExit,): | |
23 | raise | |
24 | ||
25 | except (KeyboardInterrupt,): | |
26 | exitStatus = 7 | |
27 | n.log.error("Exiting on user interrupt, <CTRL>-C") | |
28 | ||
29 | sys.exit(exitStatus) |