Skip to content

Commit

Permalink
fix #123
Browse files Browse the repository at this point in the history
  • Loading branch information
xaoyaoo committed Aug 17, 2024
1 parent 09d436a commit 3d9624f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pywxdump/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,16 @@ def init(self):
self._work_path = work_path
self.conf_file = conf_file
self.auto_setting = auto_setting
self.is_init = True

if not os.path.exists(self.conf_file):
self.set_conf(self.auto_setting, "last", "")
self.is_init = True
self.read_conf()
return True

def read_conf(self):
if not self.is_init:
self.init()
if not os.path.exists(self.conf_file):
return False
try:
with open(self.conf_file, 'r') as f:
conf = json.load(f)
Expand Down

0 comments on commit 3d9624f

Please sign in to comment.