From 28f46c8d2d9b34d3831eb286ff2a6d49b7875284 Mon Sep 17 00:00:00 2001
From: Bob Lantz <rlantz@cs.stanford.edu>
Date: Mon, 12 Mar 2012 16:12:38 -0700
Subject: [PATCH] Pass code check.

---
 .pylint              |  2 +-
 examples/miniedit.py |  2 +-
 mininet/node.py      | 14 +++++++-------
 mininet/util.py      |  6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/.pylint b/.pylint
index 4c4b48b8..85c21531 100644
--- a/.pylint
+++ b/.pylint
@@ -53,7 +53,7 @@ disable-msg-cat=IR
 #enable-msg=
 
 # Disable the message(s) with the given id(s).
-disable-msg=W0704,C0103,W0231,E1102,W0511,W0142,R0902,R0903,R0904,R0913,R0914,R0801
+disable=W0704,C0103,W0231,E1102,W0511,W0142,R0902,R0903,R0904,R0913,R0914,R0801,I0011
 
 
 [REPORTS]
diff --git a/examples/miniedit.py b/examples/miniedit.py
index 172a1f45..bd4908de 100755
--- a/examples/miniedit.py
+++ b/examples/miniedit.py
@@ -602,7 +602,7 @@ def stop( self ):
         cleanUpScreens()
         self.net = None
 
-    def xterm( self, ignore=None ):
+    def xterm( self, _ignore=None ):
         "Make an xterm when a button is pressed."
         if ( self.selection is None or
              self.net is None or
diff --git a/mininet/node.py b/mininet/node.py
index 82864666..8ebb6764 100644
--- a/mininet/node.py
+++ b/mininet/node.py
@@ -116,19 +116,19 @@ def cleanup( self ):
         self.shell = None
 
     # Subshell I/O, commands and control
-    def read( self, bytes=1024 ):
+    def read( self, maxbytes=1024 ):
         """Buffered read from node, non-blocking.
-           bytes: maximum number of bytes to return"""
+           maxbytes: maximum number of bytes to return"""
         count = len( self.readbuf )
-        if count < bytes:
-            data = os.read( self.stdout.fileno(), bytes - count )
+        if count < maxbytes:
+            data = os.read( self.stdout.fileno(), maxbytes - count )
             self.readbuf += data
-        if bytes >= len( self.readbuf ):
+        if maxbytes >= len( self.readbuf ):
             result = self.readbuf
             self.readbuf = ''
         else:
-            result = self.readbuf[ :bytes ]
-            self.readbuf = self.readbuf[ bytes: ]
+            result = self.readbuf[ :maxbytes ]
+            self.readbuf = self.readbuf[ maxbytes: ]
         return result
 
     def readline( self ):
diff --git a/mininet/util.py b/mininet/util.py
index 75065ead..d78db437 100644
--- a/mininet/util.py
+++ b/mininet/util.py
@@ -136,13 +136,13 @@ def createLink( node1, node2, port1=None, port2=None ):
 
 # IP and Mac address formatting and parsing
 
-def _colonHex( val, bytes ):
+def _colonHex( val, count ):
     """Generate colon-hex string.
        val: input as unsigned int
-       bytes: number of bytes to convert
+       count: number of bytes to convert
        returns: chStr colon-hex string"""
     pieces = []
-    for i in range( bytes - 1, -1, -1 ):
+    for i in range( count - 1, -1, -1 ):
         piece = ( ( 0xff << ( i * 8 ) ) & val ) >> ( i * 8 )
         pieces.append( '%02x' % piece )
     chStr = ':'.join( pieces )
-- 
GitLab