ia64/xen-unstable

changeset 2014:c10963d13006

bitkeeper revision 1.1108.45.2 (410c1b12fr5E-nBaA3zFwFnI4yp4yg)

Hack to work around Python 2.2's lack of gnu style getopt parsing.
author iap10@labyrinth.cl.cam.ac.uk
date Sat Jul 31 22:20:02 2004 +0000 (2004-07-31)
parents 5a95b145ae4c
children 140b3d8d1286
files BitKeeper/etc/ignore tools/python/xen/xm/opts.py
line diff
     1.1 --- a/BitKeeper/etc/ignore	Sat Jul 31 22:17:00 2004 +0000
     1.2 +++ b/BitKeeper/etc/ignore	Sat Jul 31 22:20:02 2004 +0000
     1.3 @@ -12,16 +12,13 @@ PENDING/*
     1.4  TAGS
     1.5  Twisted-1.3.0
     1.6  Twisted-1.3.0.tar.gz
     1.7 -docs/interface.aux
     1.8 -docs/interface.log
     1.9 -docs/interface.pdf
    1.10 -docs/interface.ps
    1.11 -docs/interface.toc
    1.12 -docs/user.aux
    1.13 -docs/user.log
    1.14 -docs/user.pdf
    1.15 -docs/user.ps
    1.16 -docs/user.toc
    1.17 +docs/*.aux
    1.18 +docs/*.log
    1.19 +docs/*.pdf
    1.20 +docs/*.ps
    1.21 +docs/*.toc
    1.22 +docs/interface/*
    1.23 +docs/user/*
    1.24  extras/mini-os/h/hypervisor-ifs
    1.25  install
    1.26  install/*
     2.1 --- a/tools/python/xen/xm/opts.py	Sat Jul 31 22:17:00 2004 +0000
     2.2 +++ b/tools/python/xen/xm/opts.py	Sat Jul 31 22:20:02 2004 +0000
     2.3 @@ -273,10 +273,19 @@ class Opts:
     2.4          return remaining arguments
     2.5          """
     2.6          self.argv = argv
     2.7 +
     2.8          try:
     2.9              (vals, args) = getopt(argv[1:], self.short_opts(), self.long_opts())
    2.10          except GetoptError, err:
    2.11              self.err(str(err))
    2.12 +
    2.13 +	# hack to work around lack of gnu getopts parsing in python 2.2
    2.14 +	xargs = args
    2.15 +	while xargs[1:]:
    2.16 +	    (v,xargs) = getopt(xargs[1:], self.short_opts(), self.long_opts())
    2.17 +	    vals = vals + v
    2.18 +
    2.19 +	# back to the real work
    2.20          self.args = args
    2.21          for (k, v) in vals:
    2.22              for opt in self.options: