File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ def get(self, key) -> Optional[Any]:
2424
2525 def save (self ):
2626 with self .path .open ('w' ) as f :
27- json .dump (self .data , f )
27+ json .dump (self .data , f , indent = 4 , sort_keys = True )
2828
2929 def load (self ):
3030 try :
Original file line number Diff line number Diff line change 44from appdirs import user_config_dir
55from .base import ConfigBase
66
7- appname = 'Novelsave '
7+ appname = 'qrshare '
88appauthor = 'mHaisham'
99
1010class UserConfig :
@@ -13,10 +13,10 @@ def __init__(self):
1313 self .path = Path (user_config_dir (appname , appauthor ))
1414 self .path .mkdir (parents = True , exist_ok = True )
1515
16- self .config = ConfigBase (self .path , 'config.json' )
16+ self .config = ConfigBase (self .path , 'config.json' , load = True )
1717 self .init_secret_key ()
1818
1919 def init_secret_key (self ):
2020 key = self .config .get ("SECRET_KEY" )
2121 if key is None :
22- self .config .put ("SECRET_KEY" , uuid4 (). get_hex ( ))
22+ self .config .put ("SECRET_KEY" , str ( uuid4 ()))
You can’t perform that action at this time.
0 commit comments