pylint: Skip hashlib import hackery and remove unused variable
hashlib's dynamic import hackery makes pylint very sad since it cannot realize that the module has sha256 member (just created dynamically), so let's just make it skip this error. Also remove unused variable in virtinst.cli Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
a0c2fdf429
commit
10331a5f14
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Utility functions for the command line drivers
|
||||
#
|
||||
# Copyright 2006-2007, 2013 Red Hat, Inc.
|
||||
# Copyright 2006-2007, 2013, 2014 Red Hat, Inc.
|
||||
# Jeremy Katz <katzj@redhat.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
@ -95,7 +95,6 @@ class VirtHelpFormatter(argparse.HelpFormatter):
|
|||
|
||||
|
||||
def setupParser(usage, description):
|
||||
parse_class = argparse.ArgumentParser
|
||||
epilog = _("See man page for examples and full option syntax.")
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Sample code to parse an image XML description and
|
||||
# spit out libvirt XML
|
||||
#
|
||||
# Copyright 2007, 2013 Red Hat, Inc.
|
||||
# Copyright 2007, 2013, 2014 Red Hat, Inc.
|
||||
# David Lutterkort <dlutter@redhat.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
@ -260,7 +260,7 @@ class Disk(object):
|
|||
if hashlib:
|
||||
if "sha256" in self.csum:
|
||||
csumvalue = self.csum["sha256"]
|
||||
m = hashlib.sha256()
|
||||
m = hashlib.sha256() # pylint: disable-msg=E1101
|
||||
|
||||
elif "sha1" in self.csum:
|
||||
csumvalue = self.csum["sha1"]
|
||||
|
|
Loading…
Reference in New Issue