Revision 28f46c8d

View differences:

.pylint
53 53
#enable-msg=
54 54

  
55 55
# Disable the message(s) with the given id(s).
56
disable-msg=W0704,C0103,W0231,E1102,W0511,W0142,R0902,R0903,R0904,R0913,R0914,R0801
56
disable=W0704,C0103,W0231,E1102,W0511,W0142,R0902,R0903,R0904,R0913,R0914,R0801,I0011
57 57

  
58 58

  
59 59
[REPORTS]
examples/miniedit.py
602 602
        cleanUpScreens()
603 603
        self.net = None
604 604

  
605
    def xterm( self, ignore=None ):
605
    def xterm( self, _ignore=None ):
606 606
        "Make an xterm when a button is pressed."
607 607
        if ( self.selection is None or
608 608
             self.net is None or
mininet/node.py
116 116
        self.shell = None
117 117

  
118 118
    # Subshell I/O, commands and control
119
    def read( self, bytes=1024 ):
119
    def read( self, maxbytes=1024 ):
120 120
        """Buffered read from node, non-blocking.
121
           bytes: maximum number of bytes to return"""
121
           maxbytes: maximum number of bytes to return"""
122 122
        count = len( self.readbuf )
123
        if count < bytes:
124
            data = os.read( self.stdout.fileno(), bytes - count )
123
        if count < maxbytes:
124
            data = os.read( self.stdout.fileno(), maxbytes - count )
125 125
            self.readbuf += data
126
        if bytes >= len( self.readbuf ):
126
        if maxbytes >= len( self.readbuf ):
127 127
            result = self.readbuf
128 128
            self.readbuf = ''
129 129
        else:
130
            result = self.readbuf[ :bytes ]
131
            self.readbuf = self.readbuf[ bytes: ]
130
            result = self.readbuf[ :maxbytes ]
131
            self.readbuf = self.readbuf[ maxbytes: ]
132 132
        return result
133 133

  
134 134
    def readline( self ):
mininet/util.py
136 136

  
137 137
# IP and Mac address formatting and parsing
138 138

  
139
def _colonHex( val, bytes ):
139
def _colonHex( val, count ):
140 140
    """Generate colon-hex string.
141 141
       val: input as unsigned int
142
       bytes: number of bytes to convert
142
       count: number of bytes to convert
143 143
       returns: chStr colon-hex string"""
144 144
    pieces = []
145
    for i in range( bytes - 1, -1, -1 ):
145
    for i in range( count - 1, -1, -1 ):
146 146
        piece = ( ( 0xff << ( i * 8 ) ) & val ) >> ( i * 8 )
147 147
        pieces.append( '%02x' % piece )
148 148
    chStr = ':'.join( pieces )

Also available in: Unified diff