[libvirt] [sandbox PATCH 1/2] Verify that a created Generic Sandbox does not exist before creating it
Daniel P. Berrange
berrange at redhat.com
Fri May 10 18:52:01 UTC 2013
On Fri, May 10, 2013 at 02:29:24PM -0400, dwalsh at redhat.com wrote:
> From: Dan Walsh <dwalsh at redhat.com>
>
> ---
> bin/virt-sandbox-service | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service
> index 942f788..d7f43a5 100755
> --- a/bin/virt-sandbox-service
> +++ b/bin/virt-sandbox-service
> @@ -333,6 +333,9 @@ class GenericContainer(Container):
> self.save_config()
>
> def create(self):
> + config_path = self.get_config_path()
> + if os.path.exists(config_path):
> + raise ValueError([_("%s already exists") % config_path ])
> try:
> self.create_generic()
> except Exception, e:
ACK
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list