##// END OF EJS Templates
Catch errors filling readline history on startup....
Thomas Kluyver -
Show More
@@ -1862,14 +1862,20 b' class InteractiveShell(SingletonConfigurable):'
1862 # Ignore blank lines and consecutive duplicates
1862 # Ignore blank lines and consecutive duplicates
1863 cell = cell.rstrip()
1863 cell = cell.rstrip()
1864 if cell and (cell != last_cell):
1864 if cell and (cell != last_cell):
1865 if self.multiline_history:
1865 try:
1866 self.readline.add_history(py3compat.unicode_to_str(cell,
1866 if self.multiline_history:
1867 stdin_encoding))
1867 self.readline.add_history(py3compat.unicode_to_str(cell,
1868 else:
1868 stdin_encoding))
1869 for line in cell.splitlines():
1869 else:
1870 self.readline.add_history(py3compat.unicode_to_str(line,
1870 for line in cell.splitlines():
1871 stdin_encoding))
1871 self.readline.add_history(py3compat.unicode_to_str(line,
1872 last_cell = cell
1872 stdin_encoding))
1873 last_cell = cell
1874
1875 except TypeError:
1876 # The history DB can get corrupted so it returns strings
1877 # containing null bytes, which readline objects to.
1878 continue
1873
1879
1874 @skip_doctest
1880 @skip_doctest
1875 def set_next_input(self, s):
1881 def set_next_input(self, s):
General Comments 0
You need to be logged in to leave comments. Login now