Permalink
Browse files

Merge pull request #841 from gabay/master

replaces isinstance(str) with isinstance(BaseString)
(note we define BaseString as str for python 3)
  • Loading branch information...
lantz committed Nov 15, 2018
2 parents b7a6b81 + c7a27b8 commit 73f530b569aa17723ba28f7e52a2159ce19348bc
Showing with 2 additions and 2 deletions.
  1. +2 −2 mininet/util.py
@@ -66,7 +66,7 @@ def oldQuietRun( *cmd ):
cmd: list of command params"""
if len( cmd ) == 1:
cmd = cmd[ 0 ]
if isinstance( cmd, str ):
if isinstance( cmd, BaseString ):
cmd = cmd.split( ' ' )
popen = Popen( cmd, stdout=PIPE, stderr=STDOUT )
# We can't use Popen.communicate() because it uses
@@ -107,7 +107,7 @@ def errRun( *cmd, **kwargs ):
if len( cmd ) == 1:
cmd = cmd[ 0 ]
# Allow passing in a list or a string
if isinstance( cmd, str ) and not shell:
if isinstance( cmd, BaseString ) and not shell:
cmd = cmd.split( ' ' )
cmd = [ str( arg ) for arg in cmd ]
elif isinstance( cmd, list ) and shell:

0 comments on commit 73f530b

Please sign in to comment.