mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
bitkeeper revision 1.1108.45.2 (410c1b12fr5E-nBaA3zFwFnI4yp4yg)
Hack to work around Python 2.2's lack of gnu style getopt parsing.
This commit is contained in:
1 parent
972900768d
commit
e3993769c0
2 files changed
+16
-10
No files matched your search
@@ -273,10 +273,19 @@ class Opts:
|
||||
return remaining arguments
|
||||
"""
|
||||
self.argv = argv
|
||||
|
||||
try:
|
||||
(vals, args) = getopt(argv[1:], self.short_opts(), self.long_opts())
|
||||
except GetoptError, err:
|
||||
self.err(str(err))
|
||||
|
||||
# hack to work around lack of gnu getopts parsing in python 2.2
|
||||
xargs = args
|
||||
while xargs[1:]:
|
||||
(v,xargs) = getopt(xargs[1:], self.short_opts(), self.long_opts())
|
||||
vals = vals + v
|
||||
|
||||
# back to the real work
|
||||
self.args = args
|
||||
for (k, v) in vals:
|
||||
for opt in self.options:
|
||||
|
||||