Last change
on this file since 34 was
34,
checked in by hartmans, 17 years ago
|
Add xen and xen-common
|
-
Property svn:executable set to
*
-
Property svn:mime-type set to
text/script
|
File size:
768 bytes
|
Line | |
---|
1 | #!/usr/bin/env python |
---|
2 | # -*- mode: python; -*- |
---|
3 | |
---|
4 | import os |
---|
5 | import sys |
---|
6 | |
---|
7 | def hline(): |
---|
8 | print >>sys.stderr, "*" * 70 |
---|
9 | |
---|
10 | def msg(message): |
---|
11 | print >>sys.stderr, "*" * 3, message |
---|
12 | |
---|
13 | def check_logging(): |
---|
14 | """Check python logging is installed and raise an error if not. |
---|
15 | Logging is standard from Python 2.3 on. |
---|
16 | """ |
---|
17 | try: |
---|
18 | import logging |
---|
19 | except ImportError: |
---|
20 | hline() |
---|
21 | msg("") |
---|
22 | msg(" *** Python logging is not installed.") |
---|
23 | msg(" *** Use 'make install-logging' at the xen root to install.") |
---|
24 | msg(" *** ") |
---|
25 | msg(" *** Alternatively download and install from") |
---|
26 | msg(" *** http://www.red-dove.com/python_logging.html") |
---|
27 | hline() |
---|
28 | sys.exit(1) |
---|
29 | |
---|
30 | if __name__ == '__main__': |
---|
31 | check_logging() |
---|
Note: See
TracBrowser
for help on using the repository browser.