Remove some dead code.

See #973.
This commit is contained in:
Florian Bruhin 2015-10-04 20:43:29 +02:00
parent f4fdcbdd71
commit 005753e83e
5 changed files with 0 additions and 23 deletions

View File

@ -217,14 +217,6 @@ class CommandDispatcher:
raise cmdexc.CommandError("Last focused tab vanished!")
self._set_current_index(idx)
def _editor_cleanup(self, oshandle, filename):
"""Clean up temporary file when the editor was closed."""
try:
os.close(oshandle)
os.remove(filename)
except OSError:
raise cmdexc.CommandError("Failed to delete tempfile...")
def _get_selection_override(self, left, right, opposite):
"""Helper function for tab_close to get the tab to select.

View File

@ -52,11 +52,6 @@ class HistoryEntry:
def __str__(self):
return '{} {}'.format(int(self.atime), self.url_string)
@classmethod
def from_str(cls, s):
"""Get a history based on a 'TIME URL' string."""
return cls(*s.split(' ', maxsplit=1))
class WebHistory(QWebHistoryInterface):

View File

@ -42,7 +42,6 @@ class UniqueNamespace(peg.Namespace):
# RFC 2616
separator_chars = "()<>@,;:\\\"/[]?={} \t"
ctl_chars = ''.join(chr(i) for i in range(32)) + chr(127)
nontoken_chars = separator_chars + ctl_chars
# RFC 5987

View File

@ -64,7 +64,6 @@ class WebView(QWebView):
win_id: The window ID of the view.
search_text: The text of the last search.
search_flags: The search flags of the last search.
_cur_url: The current URL (accessed via cur_url property).
_has_ssl_errors: Whether SSL errors occurred during loading.
_zoom: A NeighborList with the zoom levels.
_old_scroll_pos: The old scroll position.
@ -119,7 +118,6 @@ class WebView(QWebView):
# See https://github.com/The-Compiler/qutebrowser/issues/390
self.destroyed.connect(functools.partial(
cfg.changed.disconnect, self.init_neighborlist))
self._cur_url = None
self.cur_url = QUrl()
self.progress = 0
self.registry = objreg.ObjectRegistry()

View File

@ -42,13 +42,6 @@ class NoSuchCommandError(CommandMetaError):
pass
class ArgumentCountError(CommandMetaError):
"""Raised when a command was called with an invalid count of arguments."""
pass
class ArgumentTypeError(CommandMetaError):
"""Raised when an argument had an invalid type."""