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