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