Fix some pylint

This commit is contained in:
Cole Robinson 2013-12-18 16:34:10 -05:00
parent febd8bf4e5
commit 5c1ed03b89
3 changed files with 5 additions and 4 deletions

View File

@ -182,7 +182,7 @@ class vmmConfig(object):
try: try:
# Check we can open the Python guestfs module. # Check we can open the Python guestfs module.
from guestfs import GuestFS # pylint: disable=F0401 from guestfs import GuestFS # pylint: disable=F0401
GuestFS(close_on_exit = False) GuestFS(close_on_exit=False)
return True return True
except: except:
return False return False

View File

@ -163,7 +163,7 @@ class vmmInspection(vmmGObject):
vm.get_name()) vm.get_name())
return None return None
g = GuestFS(close_on_exit = False) g = GuestFS(close_on_exit=False)
prettyvm = conn.get_uri() + ":" + vm.get_name() prettyvm = conn.get_uri() + ":" + vm.get_name()
ignore = vmuuid ignore = vmuuid

View File

@ -35,6 +35,8 @@ def check_packagekit(parent, errbox, packages):
Returns None when we determine nothing useful. Returns None when we determine nothing useful.
Returns (success, did we just install libvirt) otherwise. Returns (success, did we just install libvirt) otherwise.
""" """
ignore = errbox
if not packages: if not packages:
logging.debug("No PackageKit packages to search for.") logging.debug("No PackageKit packages to search for.")
return return
@ -55,8 +57,7 @@ def check_packagekit(parent, errbox, packages):
except Exception, e: except Exception, e:
# PackageKit frontend should report an error for us, so just log # PackageKit frontend should report an error for us, so just log
# the actual error # the actual error
logging.debug("Error talking to PackageKit: %s" % str(e), logging.debug("Error talking to PackageKit: %s", str(e), exc_info=True)
exc_info=True)
return return
return True return True