mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Reorder imports, use json.load(f)
This commit is contained in:
parent
301465a49a
commit
56109a7012
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user