Skip to content

Commit

Permalink
When eval-ing python expressions, return falsy but not-None values (m…
Browse files Browse the repository at this point in the history
  • Loading branch information
cheriimoya authored Feb 24, 2022
1 parent c3ba039 commit 270a6ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mininet/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def do_py( self, line ):
try:
# pylint: disable=eval-used
result = eval( line, globals(), self.getLocals() )
if not result:
if result is None:
return
elif isinstance( result, str ):
output( result + '\n' )
Expand Down

0 comments on commit 270a6ba

Please sign in to comment.