Make this run again

This commit is contained in:
Florian Bruhin 2014-03-03 21:46:53 +01:00
parent 4f5b6040ad
commit 1c43da163e
2 changed files with 14 additions and 13 deletions

View File

@ -19,6 +19,7 @@
import inspect
from PyQt5.QtCore import pyqtSignal, pyqtSlot, QObject
from PyQt5.QtWebKitWidgets import QWebPage
import qutebrowser.config.config as config

View File

@ -17,8 +17,6 @@
"""Setting options used for qutebrowser."""
import qutebrowser.commands.utils as cmdutils
class ValidValues:
@ -207,21 +205,23 @@ class Command(BaseType):
"""Base class for a command value with arguments."""
# FIXME we need to use this without having problems with circular imports.
typestr = 'command'
valid_values = ValidValues(*cmdutils.cmd_dict.items())
#valid_values = ValidValues(*cmdutils.cmd_dict.items())
def validate(self, value):
# We need to import this here to avoid circular dependencies
from qutebrowser.commands.parsers import (CommandParser,
NoSuchCommandError)
cp = CommandParser()
try:
cp.parse(value)
except NoSuchCommandError:
return False
else:
return True
#from qutebrowser.commands.parsers import (CommandParser,
# NoSuchCommandError)
#cp = CommandParser()
#try:
# cp.parse(value)
#except NoSuchCommandError:
# return False
#else:
# return True
return True
class Color(BaseType):