mirror of
https://github.com/vale981/rmview
synced 2025-03-05 09:11:39 -05:00
Bugfix open settings
This commit is contained in:
parent
7593b7d9ad
commit
9108221e91
1 changed files with 2 additions and 1 deletions
|
@ -338,6 +338,7 @@ class rMViewApp(QApplication):
|
||||||
|
|
||||||
confpath = os.path.abspath(self.config_file or self.DEFAULT_CONFIG)
|
confpath = os.path.abspath(self.config_file or self.DEFAULT_CONFIG)
|
||||||
if not os.path.isfile(confpath):
|
if not os.path.isfile(confpath):
|
||||||
|
os.makedirs(os.path.dirname(confpath))
|
||||||
with open(confpath, "w") as f:
|
with open(confpath, "w") as f:
|
||||||
json.dump({
|
json.dump({
|
||||||
"ssh": {"address": [self.config['ssh'].get('address', "10.11.99.1")]},
|
"ssh": {"address": [self.config['ssh'].get('address', "10.11.99.1")]},
|
||||||
|
@ -346,7 +347,7 @@ class rMViewApp(QApplication):
|
||||||
"pen_color": "red",
|
"pen_color": "red",
|
||||||
"pen_trail": 200
|
"pen_trail": 200
|
||||||
}, f, indent=4)
|
}, f, indent=4)
|
||||||
QDesktopServices.openUrl(QUrl("file://" + confpath))
|
QDesktopServices.openUrl(QUrl("file:///" + confpath))
|
||||||
self.quit()
|
self.quit()
|
||||||
|
|
||||||
@pyqtSlot(Exception)
|
@pyqtSlot(Exception)
|
||||||
|
|
Loading…
Add table
Reference in a new issue