mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
python: drop unnecessary conn assignment
Since 554d82a200, conn is unused. Let's
drop it - but keep the signature of the constructor for backward
compatibility.
This commit is contained in:
committed by
Eric Blake
parent
2e7294df08
commit
fe3bb9440a
@@ -18,15 +18,6 @@ import types
|
|||||||
class libvirtError(Exception):
|
class libvirtError(Exception):
|
||||||
def __init__(self, defmsg, conn=None, dom=None, net=None, pool=None, vol=None):
|
def __init__(self, defmsg, conn=None, dom=None, net=None, pool=None, vol=None):
|
||||||
|
|
||||||
if dom is not None:
|
|
||||||
conn = dom._conn
|
|
||||||
elif net is not None:
|
|
||||||
conn = net._conn
|
|
||||||
elif pool is not None:
|
|
||||||
conn = pool._conn
|
|
||||||
elif vol is not None:
|
|
||||||
conn = vol._conn
|
|
||||||
|
|
||||||
# Never call virConnGetLastError().
|
# Never call virConnGetLastError().
|
||||||
# virGetLastError() is now thread local
|
# virGetLastError() is now thread local
|
||||||
err = virGetLastError()
|
err = virGetLastError()
|
||||||
|
|||||||
Reference in New Issue
Block a user