Merge pull request #207 from zeronet-conservancy/fix_site_import
revert circular import style in Site/SiteManager
This commit is contained in:
commit
ddde202879
1 changed files with 2 additions and 1 deletions
|
@ -14,7 +14,6 @@ from Config import config
|
||||||
from util import helper
|
from util import helper
|
||||||
from util import RateLimit
|
from util import RateLimit
|
||||||
from util import Cached
|
from util import Cached
|
||||||
from .Site import Site
|
|
||||||
from Debug import Debug
|
from Debug import Debug
|
||||||
|
|
||||||
@PluginManager.acceptPlugins
|
@PluginManager.acceptPlugins
|
||||||
|
@ -31,6 +30,7 @@ class SiteManager(object):
|
||||||
# Load all sites from data/sites.json
|
# Load all sites from data/sites.json
|
||||||
@util.Noparallel()
|
@util.Noparallel()
|
||||||
def load(self, cleanup=True, startup=False):
|
def load(self, cleanup=True, startup=False):
|
||||||
|
from .Site import Site
|
||||||
self.log.info("Loading sites... (cleanup: %s, startup: %s)" % (cleanup, startup))
|
self.log.info("Loading sites... (cleanup: %s, startup: %s)" % (cleanup, startup))
|
||||||
self.loaded = False
|
self.loaded = False
|
||||||
address_found = []
|
address_found = []
|
||||||
|
@ -169,6 +169,7 @@ class SiteManager(object):
|
||||||
return site
|
return site
|
||||||
|
|
||||||
def add(self, address, all_file=True, settings=None, **kwargs):
|
def add(self, address, all_file=True, settings=None, **kwargs):
|
||||||
|
from .Site import Site
|
||||||
self.sites_changed = int(time.time())
|
self.sites_changed = int(time.time())
|
||||||
# Try to find site with differect case
|
# Try to find site with differect case
|
||||||
for recover_address, recover_site in list(self.sites.items()):
|
for recover_address, recover_site in list(self.sites.items()):
|
||||||
|
|
Loading…
Reference in a new issue