Change config file name
This commit is contained in:
@ -41,6 +41,7 @@ fix_mode = [
|
|||||||
'0=None', '1=No', '2=2D', '3=3D'
|
'0=None', '1=No', '2=2D', '3=3D'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
config_file = "gps_tool.yaml"
|
||||||
gpsd_host="127.0.0.1"
|
gpsd_host="127.0.0.1"
|
||||||
gpsd_report = ()
|
gpsd_report = ()
|
||||||
|
|
||||||
@ -286,8 +287,8 @@ class QtGPSWindow(MainWindow):
|
|||||||
self.log_enabled = 0
|
self.log_enabled = 0
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
if os.path.isfile('config.yaml'):
|
if os.path.isfile(config_file):
|
||||||
with open('config.yaml') as f:
|
with open(config_file) as f:
|
||||||
config = yaml.load(f, Loader=yaml.FullLoader)
|
config = yaml.load(f, Loader=yaml.FullLoader)
|
||||||
if 'gpsd_host' in config:
|
if 'gpsd_host' in config:
|
||||||
gpsd_host = config['gpsd_host']
|
gpsd_host = config['gpsd_host']
|
||||||
|
|||||||
Reference in New Issue
Block a user