ia64/xen-unstable

view tools/check/check_twisted @ 4591:6375127fdf23

bitkeeper revision 1.1311.1.1 (426641eeBv97w6sl983zxeR4Dc3Utg)

Cleanup page table handling. Add macros to access page table
entries, fixup plenty of places in the code to use the page
table types instead of "unsigned long".

Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
Signed-off-by: michael.fetterman@cl.cam.ac.uk
author mafetter@fleming.research
date Wed Apr 20 11:50:06 2005 +0000 (2005-04-20)
parents 0a4b76b6b5a0
children
line source
1 #!/usr/bin/env python
2 # CHECK-INSTALL
3 # -*- mode: python; -*-
5 import os
6 import sys
8 def hline():
9 print >>sys.stderr, "*" * 70
11 def msg(message):
12 print >>sys.stderr, "*" * 3, message
14 def check_twisted_version():
15 """Check twisted is installed with a supported version and print a warning if not.
16 Raises an error if twisted is not installed.
17 """
18 # Supported twisted release and major version.
19 RELEASE = 1
20 MAJOR = 3
21 try:
22 from twisted.copyright import version
23 except ImportError:
24 hline()
25 msg("The Twisted framework is not installed.")
26 msg("Use 'make install-twisted' at the xen root to install.")
27 msg("")
28 msg("Alternatively download and install version %d.%d or higher" % (RELEASE, MAJOR))
29 msg("from http://www.twistedmatrix.com/products")
30 hline()
31 sys.exit(1)
33 (release, major, minor) = version.split('.')
34 release = int(release)
35 major = int(major)
36 if release > RELEASE: return
37 if release == RELEASE and major >= MAJOR: return
38 hline()
39 msg("Warning: Twisted version not supported: %s" % version)
40 msg("Use Twisted version %d.%d.0 or higher" % (RELEASE, MAJOR))
41 hline()
42 sys.exit(1)
44 if __name__ == '__main__':
45 check_twisted_version()