mirror of
https://github.com/onionshare/onionshare.git
synced 2025-08-02 11:26:16 -04:00
Reorder imports, use json.load(f)
This commit is contained in:
parent
301465a49a
commit
56109a7012
1 changed files with 5 additions and 2 deletions
|
@ -18,10 +18,13 @@ You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import platform, os, json
|
import json
|
||||||
|
import os
|
||||||
|
import platform
|
||||||
|
|
||||||
from . import strings, common
|
from . import strings, common
|
||||||
|
|
||||||
|
|
||||||
class Settings(object):
|
class Settings(object):
|
||||||
"""
|
"""
|
||||||
This class stores all of the settings for OnionShare, specifically for how
|
This class stores all of the settings for OnionShare, specifically for how
|
||||||
|
@ -95,7 +98,7 @@ class Settings(object):
|
||||||
try:
|
try:
|
||||||
common.log('Settings', 'load', 'Trying to load {}'.format(self.filename))
|
common.log('Settings', 'load', 'Trying to load {}'.format(self.filename))
|
||||||
with open(self.filename, 'r') as f:
|
with open(self.filename, 'r') as f:
|
||||||
self._settings = json.loads(f.read())
|
self._settings = json.load(f)
|
||||||
self.fill_in_defaults()
|
self.fill_in_defaults()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue