From 97f6cd8fdb1ff19686103db08ec77bbd1e0ded12 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 1 Jul 2009 11:13:30 -0400 Subject: [PATCH] Remove readonly connection fallback. If opening a connection R/W fails, we currently fallback to readonly. This isn't very transparent and is likely not what the user wants (full R/W or a useful error message why not). This has caused a lot of confusion and bug reports, so let's drop it. --- src/virtManager/connection.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/virtManager/connection.py b/src/virtManager/connection.py index b2257307d..d92b6b21f 100644 --- a/src/virtManager/connection.py +++ b/src/virtManager/connection.py @@ -563,22 +563,7 @@ class vmmConnection(gobject.GObject): self._do_creds, None], flags) except: - exc_info = sys.exc_info() - - # If the previous attempt was read/write try to fall back - # on read-only connection, otherwise report the error. - if not self.readOnly: - try: - self.vmm = libvirt.openReadOnly(self.uri) - self.readOnly = True - logging.exception("Read/write connection failed for %s," - " falling back on read-only." % self.uri) - return - except: - logging.exception("Readonly connection failed.") - - return exc_info - + return sys.exc_info() def _open_thread(self): logging.debug("Background thread is running")