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:
|
||||
bus = None
|
||||
if os.getenv("DBUS_STARTER_ADDRESS") is None:
|
||||
bus = dbus.SessionBus()
|
||||
else:
|
||||
bus = dbus.StarterBus()
|
||||
bus = dbus.SessionBus()
|
||||
else:
|
||||
bus = dbus.StarterBus()
|
||||
|
||||
dbusProxy = bus.get_object("org.freedesktop.DBus", "/org/freedesktop/DBus")
|
||||
dbusObj = dbus.Interface(dbusProxy, "org.freedesktop.DBus")
|
||||
|
@ -22,12 +22,12 @@ import gtk.glade
|
||||
import gnomevfs
|
||||
|
||||
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)
|
||||
|
||||
def on_url(about, link):
|
||||
gnomevfs.url_show(link)
|
||||
gnomevfs.url_show(link)
|
||||
|
||||
gtk.about_dialog_set_url_hook(on_url)
|
||||
|
||||
|
@ -458,7 +458,7 @@ class vmmAddHardware(gobject.GObject):
|
||||
|
||||
def is_visible(self):
|
||||
if self.topwin.flags() & gtk.VISIBLE:
|
||||
return 1
|
||||
return 1
|
||||
return 0
|
||||
|
||||
def finish(self, ignore=None):
|
||||
|
@ -110,7 +110,7 @@ class vmmChooseCD(gobject.GObject):
|
||||
readOnly=True,
|
||||
conn=self.conn.vmm)
|
||||
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.cancel()
|
||||
|
||||
|
@ -413,7 +413,7 @@ class vmmCreate(gobject.GObject):
|
||||
return self.window.get_widget("storage-file-size").get_value()
|
||||
|
||||
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):
|
||||
if self.connection.is_qemu_session():
|
||||
@ -598,7 +598,7 @@ class vmmCreate(gobject.GObject):
|
||||
|
||||
def is_visible(self):
|
||||
if self.topwin.flags() & gtk.VISIBLE:
|
||||
return 1
|
||||
return 1
|
||||
return 0
|
||||
|
||||
def finish(self, ignore=None):
|
||||
@ -1023,8 +1023,8 @@ class vmmCreate(gobject.GObject):
|
||||
return False
|
||||
|
||||
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 ?"))
|
||||
return res
|
||||
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
|
||||
|
||||
elif page_num == PAGE_NETWORK:
|
||||
|
||||
|
@ -270,7 +270,7 @@ class vmmCreateNetwork(gobject.GObject):
|
||||
|
||||
def is_visible(self):
|
||||
if self.topwin.flags() & gtk.VISIBLE:
|
||||
return 1
|
||||
return 1
|
||||
return 0
|
||||
|
||||
def finish(self, ignore=None):
|
||||
|
@ -552,7 +552,7 @@ class vmmDetails(gobject.GObject):
|
||||
|
||||
def is_visible(self):
|
||||
if self.window.get_widget("vmm-details").flags() & gtk.VISIBLE:
|
||||
return 1
|
||||
return 1
|
||||
return 0
|
||||
|
||||
def view_manager(self, src):
|
||||
|
@ -171,7 +171,7 @@ class vmmDomain(gobject.GObject):
|
||||
rx += io[0]
|
||||
tx += io[4]
|
||||
except libvirt.libvirtError, err:
|
||||
logging.error("Error reading interface stats %s" % err)
|
||||
logging.error("Error reading interface stats %s" % err)
|
||||
return rx, tx
|
||||
|
||||
def _sample_disk_io_dummy(self):
|
||||
@ -187,7 +187,7 @@ class vmmDomain(gobject.GObject):
|
||||
rd += io[1]
|
||||
wr += io[3]
|
||||
except libvirt.libvirtError, err:
|
||||
logging.error("Error reading block stats %s" % err)
|
||||
logging.error("Error reading block stats %s" % err)
|
||||
return rd, wr
|
||||
|
||||
def _get_cur_rate(self, what):
|
||||
@ -854,8 +854,8 @@ class vmmDomain(gobject.GObject):
|
||||
|
||||
elif dev_type == "parallel" or dev_type == "console" or \
|
||||
dev_type == "serial":
|
||||
port = dev_ctx.xpathEval("/%s/target/@port" % dev_type)
|
||||
if port and len(port) > 0 and port[0].content != None:
|
||||
port = dev_ctx.xpathEval("/%s/target/@port" % dev_type)
|
||||
if port and len(port) > 0 and port[0].content != None:
|
||||
logging.debug("Looking for %s w/ port %s" % (dev_type,
|
||||
port))
|
||||
ret = ctx.xpathEval("/domain/devices/%s[target/@port='%s']" % (dev_type, port[0].content))
|
||||
|
@ -449,7 +449,7 @@ class vmmEngine(gobject.GObject):
|
||||
try:
|
||||
vm.destroy()
|
||||
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):
|
||||
con = self.get_connection(uri, False)
|
||||
|
@ -194,7 +194,7 @@ class vmmHost(gobject.GObject):
|
||||
|
||||
def is_visible(self):
|
||||
if self.window.get_widget("vmm-host").flags() & gtk.VISIBLE:
|
||||
return 1
|
||||
return 1
|
||||
return 0
|
||||
|
||||
def close(self,ignore1=None,ignore2=None):
|
||||
|
@ -317,7 +317,7 @@ class vmmManager(gobject.GObject):
|
||||
|
||||
def is_visible(self):
|
||||
if self.window.get_widget("vmm-manager").flags() & gtk.VISIBLE:
|
||||
return 1
|
||||
return 1
|
||||
return 0
|
||||
|
||||
def exit_app(self, src=None, src2=None):
|
||||
|
@ -44,9 +44,9 @@ class vmmNetDevice(gobject.GObject):
|
||||
return self.bridge
|
||||
|
||||
def get_mac(self):
|
||||
return self.mac
|
||||
return self.mac
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user