mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
Fix up some indentation issues.
This commit is contained in:
parent
6491a63f6f
commit
b6e35dfd2f
@ -299,9 +299,9 @@ def main():
|
|||||||
try:
|
try:
|
||||||
bus = None
|
bus = None
|
||||||
if os.getenv("DBUS_STARTER_ADDRESS") is None:
|
if os.getenv("DBUS_STARTER_ADDRESS") is None:
|
||||||
bus = dbus.SessionBus()
|
bus = dbus.SessionBus()
|
||||||
else:
|
else:
|
||||||
bus = dbus.StarterBus()
|
bus = dbus.StarterBus()
|
||||||
|
|
||||||
dbusProxy = bus.get_object("org.freedesktop.DBus", "/org/freedesktop/DBus")
|
dbusProxy = bus.get_object("org.freedesktop.DBus", "/org/freedesktop/DBus")
|
||||||
dbusObj = dbus.Interface(dbusProxy, "org.freedesktop.DBus")
|
dbusObj = dbus.Interface(dbusProxy, "org.freedesktop.DBus")
|
||||||
|
@ -22,12 +22,12 @@ import gtk.glade
|
|||||||
import gnomevfs
|
import gnomevfs
|
||||||
|
|
||||||
def on_email(about, mail):
|
def on_email(about, mail):
|
||||||
gnomevfs.url_show("mailto:%s" % mail)
|
gnomevfs.url_show("mailto:%s" % mail)
|
||||||
|
|
||||||
gtk.about_dialog_set_email_hook(on_email)
|
gtk.about_dialog_set_email_hook(on_email)
|
||||||
|
|
||||||
def on_url(about, link):
|
def on_url(about, link):
|
||||||
gnomevfs.url_show(link)
|
gnomevfs.url_show(link)
|
||||||
|
|
||||||
gtk.about_dialog_set_url_hook(on_url)
|
gtk.about_dialog_set_url_hook(on_url)
|
||||||
|
|
||||||
|
@ -458,7 +458,7 @@ class vmmAddHardware(gobject.GObject):
|
|||||||
|
|
||||||
def is_visible(self):
|
def is_visible(self):
|
||||||
if self.topwin.flags() & gtk.VISIBLE:
|
if self.topwin.flags() & gtk.VISIBLE:
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def finish(self, ignore=None):
|
def finish(self, ignore=None):
|
||||||
|
@ -110,7 +110,7 @@ class vmmChooseCD(gobject.GObject):
|
|||||||
readOnly=True,
|
readOnly=True,
|
||||||
conn=self.conn.vmm)
|
conn=self.conn.vmm)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
return self.err.val_err(_("Invalid Media Path"), str(e))
|
return self.err.val_err(_("Invalid Media Path"), str(e))
|
||||||
self.emit("cdrom-chosen", disk.type, disk.path, self.target)
|
self.emit("cdrom-chosen", disk.type, disk.path, self.target)
|
||||||
self.cancel()
|
self.cancel()
|
||||||
|
|
||||||
|
@ -413,7 +413,7 @@ class vmmCreate(gobject.GObject):
|
|||||||
return self.window.get_widget("storage-file-size").get_value()
|
return self.window.get_widget("storage-file-size").get_value()
|
||||||
|
|
||||||
def get_config_kernel_params(self):
|
def get_config_kernel_params(self):
|
||||||
return self.window.get_widget("kernel-params").get_text()
|
return self.window.get_widget("kernel-params").get_text()
|
||||||
|
|
||||||
def get_config_network(self):
|
def get_config_network(self):
|
||||||
if self.connection.is_qemu_session():
|
if self.connection.is_qemu_session():
|
||||||
@ -598,7 +598,7 @@ class vmmCreate(gobject.GObject):
|
|||||||
|
|
||||||
def is_visible(self):
|
def is_visible(self):
|
||||||
if self.topwin.flags() & gtk.VISIBLE:
|
if self.topwin.flags() & gtk.VISIBLE:
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def finish(self, ignore=None):
|
def finish(self, ignore=None):
|
||||||
@ -1023,8 +1023,8 @@ class vmmCreate(gobject.GObject):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
if self._disk.is_conflict_disk(self._guest.conn) is True:
|
if self._disk.is_conflict_disk(self._guest.conn) is True:
|
||||||
res = self.err.yes_no(_('Disk "%s" is already in use by another guest!' % self._disk.path), _("Do you really want to use the disk ?"))
|
res = self.err.yes_no(_('Disk "%s" is already in use by another guest!' % self._disk.path), _("Do you really want to use the disk ?"))
|
||||||
return res
|
return res
|
||||||
|
|
||||||
elif page_num == PAGE_NETWORK:
|
elif page_num == PAGE_NETWORK:
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ class vmmCreateNetwork(gobject.GObject):
|
|||||||
|
|
||||||
def is_visible(self):
|
def is_visible(self):
|
||||||
if self.topwin.flags() & gtk.VISIBLE:
|
if self.topwin.flags() & gtk.VISIBLE:
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def finish(self, ignore=None):
|
def finish(self, ignore=None):
|
||||||
|
@ -552,7 +552,7 @@ class vmmDetails(gobject.GObject):
|
|||||||
|
|
||||||
def is_visible(self):
|
def is_visible(self):
|
||||||
if self.window.get_widget("vmm-details").flags() & gtk.VISIBLE:
|
if self.window.get_widget("vmm-details").flags() & gtk.VISIBLE:
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def view_manager(self, src):
|
def view_manager(self, src):
|
||||||
|
@ -171,7 +171,7 @@ class vmmDomain(gobject.GObject):
|
|||||||
rx += io[0]
|
rx += io[0]
|
||||||
tx += io[4]
|
tx += io[4]
|
||||||
except libvirt.libvirtError, err:
|
except libvirt.libvirtError, err:
|
||||||
logging.error("Error reading interface stats %s" % err)
|
logging.error("Error reading interface stats %s" % err)
|
||||||
return rx, tx
|
return rx, tx
|
||||||
|
|
||||||
def _sample_disk_io_dummy(self):
|
def _sample_disk_io_dummy(self):
|
||||||
@ -187,7 +187,7 @@ class vmmDomain(gobject.GObject):
|
|||||||
rd += io[1]
|
rd += io[1]
|
||||||
wr += io[3]
|
wr += io[3]
|
||||||
except libvirt.libvirtError, err:
|
except libvirt.libvirtError, err:
|
||||||
logging.error("Error reading block stats %s" % err)
|
logging.error("Error reading block stats %s" % err)
|
||||||
return rd, wr
|
return rd, wr
|
||||||
|
|
||||||
def _get_cur_rate(self, what):
|
def _get_cur_rate(self, what):
|
||||||
@ -854,8 +854,8 @@ class vmmDomain(gobject.GObject):
|
|||||||
|
|
||||||
elif dev_type == "parallel" or dev_type == "console" or \
|
elif dev_type == "parallel" or dev_type == "console" or \
|
||||||
dev_type == "serial":
|
dev_type == "serial":
|
||||||
port = dev_ctx.xpathEval("/%s/target/@port" % dev_type)
|
port = dev_ctx.xpathEval("/%s/target/@port" % dev_type)
|
||||||
if port and len(port) > 0 and port[0].content != None:
|
if port and len(port) > 0 and port[0].content != None:
|
||||||
logging.debug("Looking for %s w/ port %s" % (dev_type,
|
logging.debug("Looking for %s w/ port %s" % (dev_type,
|
||||||
port))
|
port))
|
||||||
ret = ctx.xpathEval("/domain/devices/%s[target/@port='%s']" % (dev_type, port[0].content))
|
ret = ctx.xpathEval("/domain/devices/%s[target/@port='%s']" % (dev_type, port[0].content))
|
||||||
|
@ -449,7 +449,7 @@ class vmmEngine(gobject.GObject):
|
|||||||
try:
|
try:
|
||||||
vm.destroy()
|
vm.destroy()
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
self.err.show_err(_("Error shutting down domain: %s" % str(e)), "".join(traceback.format_exc()))
|
self.err.show_err(_("Error shutting down domain: %s" % str(e)), "".join(traceback.format_exc()))
|
||||||
|
|
||||||
def suspend_domain(self, src, uri, uuid):
|
def suspend_domain(self, src, uri, uuid):
|
||||||
con = self.get_connection(uri, False)
|
con = self.get_connection(uri, False)
|
||||||
|
@ -194,7 +194,7 @@ class vmmHost(gobject.GObject):
|
|||||||
|
|
||||||
def is_visible(self):
|
def is_visible(self):
|
||||||
if self.window.get_widget("vmm-host").flags() & gtk.VISIBLE:
|
if self.window.get_widget("vmm-host").flags() & gtk.VISIBLE:
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def close(self,ignore1=None,ignore2=None):
|
def close(self,ignore1=None,ignore2=None):
|
||||||
|
@ -317,7 +317,7 @@ class vmmManager(gobject.GObject):
|
|||||||
|
|
||||||
def is_visible(self):
|
def is_visible(self):
|
||||||
if self.window.get_widget("vmm-manager").flags() & gtk.VISIBLE:
|
if self.window.get_widget("vmm-manager").flags() & gtk.VISIBLE:
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def exit_app(self, src=None, src2=None):
|
def exit_app(self, src=None, src2=None):
|
||||||
|
@ -44,9 +44,9 @@ class vmmNetDevice(gobject.GObject):
|
|||||||
return self.bridge
|
return self.bridge
|
||||||
|
|
||||||
def get_mac(self):
|
def get_mac(self):
|
||||||
return self.mac
|
return self.mac
|
||||||
|
|
||||||
def get_info(self):
|
def get_info(self):
|
||||||
return (self.name, self.mac, self.shared, self.bridge)
|
return (self.name, self.mac, self.shared, self.bridge)
|
||||||
|
|
||||||
gobject.type_register(vmmNetDevice)
|
gobject.type_register(vmmNetDevice)
|
||||||
|
Loading…
Reference in New Issue
Block a user