FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora/Linux Management Tools

LinkBack Thread Tools
Old 12-06-2007, 06:45 AM
Tatsuro Enokura
Default fix virt-install error: "global name 'OptionValueError' is not defined"


I try virt-install command as follows,
# virt-install --name=
virt-install command says "global name 'OptionValueError' is not defined".
ERROR:root:global name 'OptionValueError' is not defined
Traceback (most recent call last):
File "/usr/bin/virt-install", line 499, in ?
File "/usr/bin/virt-install", line 347, in main
options = parse_args()
File "/usr/bin/virt-install", line 295, in parse_args
(options,args) = parser.parse_args()
File "/usr/lib/python2.4/optparse.py", line 1275, in parse_args
stop = self._process_args(largs, rargs, values)
File "/usr/lib/python2.4/optparse.py", line 1315, in _process_args
self._process_long_opt(rargs, values)
File "/usr/lib/python2.4/optparse.py", line 1390, in _process_long_opt
option.process(opt, value, values, self)
File "/usr/lib/python2.4/optparse.py", line 707, in process
return self.take_action(
File "/usr/lib/python2.4/optparse.py", line 726, in take_action
self.callback(self, opt, value, parser, *args, **kwargs)
File "/usr/lib/python2.4/site-packages/virtinst/cli.py", line 238, in check_before_store
raise OptionValueError, _("%s option requires an argument") %opt_str
NameError: global name 'OptionValueError' is not defined

So, I make a patch to solve this problem.

Signed-off-by: Tatsuro Enokura <fj7716hz@aa.jp.fujitsu.com>

Tatsuro Enokura.

diff -r c98f26991bad virtinst/cli.py
--- a/virtinst/cli.py Wed Dec 05 15:34:29 2007 -0800
+++ b/virtinst/cli.py Thu Dec 06 13:36:38 2007 +0900
@@ -22,6 +22,7 @@ import os, sys
import os, sys
import logging
import logging.handlers
+from optparse import OptionValueError

import libvirt
import util

et-mgmt-tools mailing list

Thread Tools

All times are GMT. The time now is 08:20 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org