Refactor _back_forward

This commit is contained in:
Iordanis Grigoriou 2017-07-10 15:58:11 +02:00
parent 6ab49fdf1d
commit 9c83ea4717

View File

@ -540,16 +540,13 @@ class CommandDispatcher:
else:
widget = self._current_widget()
if forward:
try:
try:
if forward:
widget.history.forward(count)
except browsertab.WebTabError as e:
raise cmdexc.CommandError(e)
else:
try:
else:
widget.history.back(count)
except browsertab.WebTabError as e:
raise cmdexc.CommandError(e)
except browsertab.WebTabError as e:
raise cmdexc.CommandError(e)
@cmdutils.register(instance='command-dispatcher', scope='window')
@cmdutils.argument('count', count=True)