When eval-ing python expressions, return falsy but not-None values (#1111)
This commit is contained in:
1 parent
c3ba039a97
commit
270a6ba333
1 file changed
+1
-1
+1
-1
@@ -184,7 +184,7 @@ class CLI( Cmd ):
|
|||||||
try:
|
try:
|
||||||
# pylint: disable=eval-used
|
# pylint: disable=eval-used
|
||||||
result = eval( line, globals(), self.getLocals() )
|
result = eval( line, globals(), self.getLocals() )
|
||||||
if not result:
|
if result is None:
|
||||||
return
|
return
|
||||||
elif isinstance( result, str ):
|
elif isinstance( result, str ):
|
||||||
output( result + '\n' )
|
output( result + '\n' )
|
||||||
|
|||||||
Reference in new issue
Block a user