Rev473, Better atomic save, Fix sitePublish command when ip_external definied
This commit is contained in:
parent
02f3a4f8eb
commit
5f5f128b8a
4 changed files with 9 additions and 5 deletions
|
@ -5,7 +5,7 @@ import os
|
|||
|
||||
from Plugin import PluginManager
|
||||
from Config import config
|
||||
|
||||
from util import helper
|
||||
|
||||
@PluginManager.acceptPlugins
|
||||
class SiteManager(object):
|
||||
|
@ -73,7 +73,7 @@ class SiteManager(object):
|
|||
# Delete from sites.json
|
||||
sites_settings = json.load(open("%s/sites.json" % config.data_dir))
|
||||
del(sites_settings[address])
|
||||
open("%s/sites.json" % config.data_dir, "w").write(json.dumps(sites_settings, indent=2, sort_keys=True))
|
||||
helper.atomicWrite("%s/sites.json" % config.data_dir, json.dumps(sites_settings, indent=2, sort_keys=True))
|
||||
|
||||
# Lazy load sites
|
||||
def list(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue