fix #4129
This commit is contained in:
@@ -211,9 +211,14 @@ class SimpleConfig(PrintError):
|
|||||||
return
|
return
|
||||||
path = os.path.join(self.path, "config")
|
path = os.path.join(self.path, "config")
|
||||||
s = json.dumps(self.user_config, indent=4, sort_keys=True)
|
s = json.dumps(self.user_config, indent=4, sort_keys=True)
|
||||||
with open(path, "w") as f:
|
try:
|
||||||
f.write(s)
|
with open(path, "w") as f:
|
||||||
os.chmod(path, stat.S_IREAD | stat.S_IWRITE)
|
f.write(s)
|
||||||
|
os.chmod(path, stat.S_IREAD | stat.S_IWRITE)
|
||||||
|
except FileNotFoundError:
|
||||||
|
# datadir probably deleted while running...
|
||||||
|
if os.path.exists(self.path): # or maybe not?
|
||||||
|
raise
|
||||||
|
|
||||||
def get_wallet_path(self):
|
def get_wallet_path(self):
|
||||||
"""Set the path of the wallet."""
|
"""Set the path of the wallet."""
|
||||||
|
|||||||
Reference in New Issue
Block a user