Reorder imports, use json.load(f)

This commit is contained in:
Delirious Lettuce 2017-07-10 20:13:30 -06:00
parent 301465a49a
commit 56109a7012

View File

@ -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/>.
"""
import platform, os, json
import json
import os
import platform
from . import strings, common
class Settings(object):
"""
This class stores all of the settings for OnionShare, specifically for how
@ -95,7 +98,7 @@ class Settings(object):
try:
common.log('Settings', 'load', 'Trying to load {}'.format(self.filename))
with open(self.filename, 'r') as f:
self._settings = json.loads(f.read())
self._settings = json.load(f)
self.fill_in_defaults()
except:
pass