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.
This commit is contained in:
Cole Robinson 2009-07-01 11:13:30 -04:00
parent ed26fe9bc7
commit 97f6cd8fdb

View File

@ -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")