Revision b1ec912d mininet/cli.py

View differences:

mininet/cli.py
96 96
    # Disable pylint "Unused argument: 'arg's'" messages, as well as
97 97
    # "method could be a function" warning, since each CLI function
98 98
    # must have the same interface
99
    # pylint: disable-msg=R0201
99
    # pylint: disable=R0201
100 100

  
101 101
    helpStr = (
102 102
        'You may also send a command to a node using:\n'
......
128 128
        nodes = ' '.join( sorted( self.mn ) )
129 129
        output( 'available nodes are: \n%s\n' % nodes )
130 130

  
131
    def do_ports( self, line ):
131
    def do_ports( self, _line ):
132 132
        "display ports and interfaces for each switch"
133 133
        dumpPorts( self.mn.switches )
134 134

  
......
142 142
        call( line, shell=True )
143 143

  
144 144
    # do_py() and do_px() need to catch any exception during eval()/exec()
145
    # pylint: disable-msg=W0703
145
    # pylint: disable=W0703
146 146

  
147 147
    def do_py( self, line ):
148 148
        """Evaluate a Python expression.
......
159 159
            output( str( e ) + '\n' )
160 160

  
161 161
    # We are in fact using the exec() pseudo-function
162
    # pylint: disable-msg=W0122
162
    # pylint: disable=W0122
163 163

  
164 164
    def do_px( self, line ):
165 165
        """Execute a Python statement.
......
169 169
        except Exception, e:
170 170
            output( str( e ) + '\n' )
171 171

  
172
    # pylint: enable-msg=W0703,W0122
172
    # pylint: enable=W0703,W0122
173 173

  
174 174
    def do_pingall( self, line ):
175 175
        "Ping between all hosts."
......
346 346
        elapsed = time.time() - start
347 347
        self.stdout.write("*** Elapsed time: %0.6f secs\n" % elapsed)
348 348

  
349
    def do_links( self, line ):
349
    def do_links( self, _line ):
350 350
        "Report on links"
351 351
        for link in self.mn.links:
352 352
            print link, link.status()
......
355 355
        "Starts or stops a switch"
356 356
        args = line.split()
357 357
        if len(args) != 2:
358
            error( 'invalid number of args: switch <switch name> {start, stop}\n' )
358
            error( 'invalid number of args: switch <switch name>'
359
                   '{start, stop}\n' )
359 360
            return
360 361
        sw = args[ 0 ]
361 362
        command = args[ 1 ]
......
397 398
        else:
398 399
            error( '*** Unknown command: %s\n' % line )
399 400

  
400
    # pylint: enable-msg=R0201
401
    # pylint: enable=R0201
401 402

  
402 403
    def waitForNode( self, node ):
403 404
        "Wait for a node to finish, and print its output."

Also available in: Unified diff