]> git.ipfire.org Git - ipfire-3.x.git/blame - make.sh
naoki: Refactor some more things on naoki.
[ipfire-3.x.git] / make.sh
CommitLineData
a6dccbc0
MT
1#!/usr/bin/python
2
3import sys
a6dccbc0
MT
4import naoki
5
0c294e96
MT
6# silence Python 2.6 buggy warnings about Exception.message
7if 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
15n = naoki.Naoki()
a6dccbc0
MT
16
17try:
928cd119
MT
18 # Run...
19 n.run()
0c294e96 20 exitStatus = 0
a6dccbc0
MT
21
22except (SystemExit,):
23 raise
24
25except (KeyboardInterrupt,):
26 exitStatus = 7
27 n.log.error("Exiting on user interrupt, <CTRL>-C")
28
29sys.exit(exitStatus)