break cicular imports in utils

This commit is contained in:
Daniel Schadt 2017-01-04 16:04:06 +01:00
parent 4fdd3cd761
commit 6497bb5ace

View File

@ -38,8 +38,6 @@ import pkg_resources
import qutebrowser import qutebrowser
from qutebrowser.utils import qtutils, log from qutebrowser.utils import qtutils, log
from qutebrowser.misc import guiprocess
from qutebrowser.config import config
fake_clipboard = None fake_clipboard = None
@ -844,6 +842,11 @@ def open_file(filename, cmdline=None):
or `default-open-dispatcher` if set. If no `{}` is found, the or `default-open-dispatcher` if set. If no `{}` is found, the
filename is appended to the cmdline. filename is appended to the cmdline.
""" """
# Import late to avoid circular imports:
# utils -> config -> configdata -> configtypes -> cmdutils -> command ->
# utils
from qutebrowser.misc import guiprocess
from qutebrowser.config import config
# the default program to open downloads with - will be empty string # the default program to open downloads with - will be empty string
# if we want to use the default # if we want to use the default
override = config.get('general', 'default-open-dispatcher') override = config.get('general', 'default-open-dispatcher')