Minor formatting, pass code check

This commit is contained in:
Bob Lantz
2015-03-18 15:32:21 -07:00
parent 4da7b3b7f0
commit f49e2539b7
+5 -5
View File
@@ -77,14 +77,14 @@ class CLI( Cmd ):
return return
cls.readlineInited = True cls.readlineInited = True
try: try:
import readline from readline import read_history_file, write_history_file
except ImportError: except ImportError:
pass pass
else: else:
history_path = os.path.expanduser('~/.mininet_history') history_path = os.path.expanduser( '~/.mininet_history' )
if os.path.isfile(history_path): if os.path.isfile( history_path ):
readline.read_history_file(history_path) read_history_file( history_path )
atexit.register(lambda: readline.write_history_file(history_path)) atexit.register( lambda: write_history_file( history_path ) )
def run( self ): def run( self ):
"Run our cmdloop(), catching KeyboardInterrupt" "Run our cmdloop(), catching KeyboardInterrupt"