« Previous | Next » 

Revision e0cd11ab

IDe0cd11ab21000ec5f3997bcee9aca61ad064f426
Parent 17ba6a7c
Child 613fac4b, a1edb167

Added by Rich Lane over 5 years ago

cli: don't read/write readline history more than once

Previously, when creating multiple CLI objects, each one would append the
~/.mininet_history file to readline's internal list. When writing the file back
it would be duplicated for each CLI object created. So, over a few mininet runs
the history file would grow exponentially.

This change moves the readline setup code out of the CLI constructor into a
class method and adds a flag to prevent it from being executed more than once.

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences