mirror of
https://github.com/retspen/webvirtcloud
synced 2026-03-22 02:24:56 +00:00
lint with black python. convert f style strings to old one.
This commit is contained in:
parent
c20c353a40
commit
c9a2c3d813
18 changed files with 956 additions and 754 deletions
|
|
@ -1380,9 +1380,9 @@ class wvmInstance(wvmConnect):
|
|||
elif net_source_type == 'iface':
|
||||
source.set('dev', net_source)
|
||||
else:
|
||||
raise libvirtError(f"Unknown network type: {net_source_type}")
|
||||
raise libvirtError("Unknown network type: {}".format(net_source_type))
|
||||
else:
|
||||
raise libvirtError(f"Unknown network type: {interface.get('type')}")
|
||||
raise libvirtError("Unknown network type: {}".format(interface.get('type')))
|
||||
|
||||
source = interface.find('model')
|
||||
if net_model != 'default':
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ class wvmNetwork(wvmConnect):
|
|||
self.leases = self.net.DHCPLeases()
|
||||
except Exception as e:
|
||||
self.leases = []
|
||||
raise f"Error getting {self} DHCP leases: {e}"
|
||||
raise "Error getting {} DHCP leases: {}".format(self, e)
|
||||
|
||||
def get_dhcp_leases(self):
|
||||
if self.leases is None:
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ def validate_macaddr(val):
|
|||
|
||||
form = re.match("^([0-9a-fA-F]{1,2}:){5}[0-9a-fA-F]{1,2}$", val)
|
||||
if form is None:
|
||||
raise ValueError(f"MAC address must be of the format AA:BB:CC:DD:EE:FF, was {val}")
|
||||
raise ValueError("MAC address must be of the format AA:BB:CC:DD:EE:FF, was {}".format(val))
|
||||
|
||||
|
||||
# Mapping of UEFI binary names to their associated architectures. We
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue