mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-26 21:57:33 +03:00
Clean up some pylint warnings on rawhide.
This commit is contained in:
parent
0b2184279a
commit
1e603974bd
@ -343,7 +343,7 @@ class vmmCreatePool(gobject.GObject):
|
||||
target = self.get_config_target_path()
|
||||
host = self.get_config_host()
|
||||
source = self.get_config_source_path()
|
||||
format = self.get_config_format()
|
||||
fmt = self.get_config_format()
|
||||
|
||||
try:
|
||||
self._pool.target_path = target
|
||||
@ -351,8 +351,8 @@ class vmmCreatePool(gobject.GObject):
|
||||
self._pool.host = host
|
||||
if source is not None:
|
||||
self._pool.source_path = source
|
||||
if format is not None:
|
||||
self._pool.format = format
|
||||
if fmt is not None:
|
||||
self._pool.format = fmt
|
||||
except ValueError, e:
|
||||
return self.err.val_err(_("Pool Parameter Error"), str(e))
|
||||
|
||||
|
@ -188,7 +188,7 @@ class vmmCreateVolume(gobject.GObject):
|
||||
name = self.window.get_widget("vol-name").get_text()
|
||||
suffix = self.window.get_widget("vol-name-suffix").get_text()
|
||||
volname = name + suffix
|
||||
format = self.get_config_format()
|
||||
fmt = self.get_config_format()
|
||||
alloc = self.window.get_widget("vol-allocation").get_value()
|
||||
cap = self.window.get_widget("vol-capacity").get_value()
|
||||
|
||||
@ -197,8 +197,8 @@ class vmmCreateVolume(gobject.GObject):
|
||||
allocation=(alloc * 1024 * 1024),
|
||||
capacity=(cap * 1024 * 1024),
|
||||
pool=self.parent_pool.pool)
|
||||
if format:
|
||||
self.vol.format = format
|
||||
if fmt:
|
||||
self.vol.format = fmt
|
||||
except ValueError, e:
|
||||
return self.err.val_err(_("Volume Parameter Error"), str(e))
|
||||
return True
|
||||
|
@ -17,11 +17,13 @@ GETTEXT_VAR="Undefined variable '_'"
|
||||
|
||||
# These all work fine and are legit, just false positives
|
||||
GOBJECT_VAR="has no '__gobject_init__' member"
|
||||
GOBJECT_INIT="__init__ method from base class 'GObject' is not called"
|
||||
EMIT_VAR="has no 'emit' member"
|
||||
ERROR_VBOX="vmmErrorDialog.__init__.*Class 'vbox' has no 'pack_start' member"
|
||||
EXCEPTHOOK="no '__excepthook__' member"
|
||||
CONNECT_VAR="no 'connect' member"
|
||||
DISCONNECT_VAR="no 'disconnect' member"
|
||||
UNABLE_IMPORT="Unable to import 'gtk.gdk.*|Unable to import 'sparkline"
|
||||
|
||||
# os._exit is needed for forked processes.
|
||||
OS_EXIT="protected member _exit of a client class"
|
||||
@ -31,6 +33,8 @@ OS_EXIT="protected member _exit of a client class"
|
||||
BTYPE_LIST="(vmmConnect.add_service|vmmConnect.remove_service|vmmConnect.add_conn_to_list)"
|
||||
BUILTIN_TYPE="${BTYPE_LIST}.*Redefining built-in 'type'"
|
||||
|
||||
# Bogus 'unable to import' warnings
|
||||
|
||||
|
||||
DMSG=""
|
||||
addmsg() {
|
||||
@ -82,6 +86,7 @@ pylint --ignore=IPy.py $FILES \
|
||||
--disable-checker=${DCHECKERS} 2>&1 | \
|
||||
egrep -ve "$NO_PYL_CONFIG" \
|
||||
-ve "$GOBJECT_VAR" \
|
||||
-ve "$GOBJECT_INIT" \
|
||||
-ve "$EMIT_VAR" \
|
||||
-ve "$CONNECT_VAR" \
|
||||
-ve "$DISCONNECT_VAR" \
|
||||
@ -89,6 +94,7 @@ pylint --ignore=IPy.py $FILES \
|
||||
-ve "$OS_EXIT" \
|
||||
-ve "$BUILTIN_TYPE" \
|
||||
-ve "$ERROR_VBOX" \
|
||||
-ve "$UNABLE_IMPORT" \
|
||||
-ve "$EXCEPTHOOK" | \
|
||||
$AWK '\
|
||||
# Strip out any "*** Module name" lines if we dont list any errors for them
|
||||
|
Loading…
x
Reference in New Issue
Block a user