mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
31 lines
722 B
Python
Executable File
31 lines
722 B
Python
Executable File
#!/usr/bin/env python
|
|
# -*- mode: python; -*-
|
|
|
|
import os
|
|
import sys
|
|
|
|
def hline():
|
|
print >>sys.stderr, "*" * 70
|
|
|
|
def msg(message):
|
|
print >>sys.stderr, "*" * 3, message
|
|
|
|
def check_logging():
|
|
"""Check python logging is installed and raise an error if not.
|
|
Logging is standard from Python 2.3 on.
|
|
"""
|
|
try:
|
|
import logging
|
|
except ImportError:
|
|
hline()
|
|
msg("Python logging is not installed.")
|
|
msg("Use 'make install-logging' at the xen root to install.")
|
|
msg("")
|
|
msg("Alternatively download and install from")
|
|
msg("http://www.red-dove.com/python_logging.html")
|
|
hline()
|
|
sys.exit(1)
|
|
|
|
if __name__ == '__main__':
|
|
check_logging()
|