Minor bug fixes
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
#! /usr/bin/python3
|
#! /usr/bin/python3
|
||||||
|
|
||||||
|
import os
|
||||||
from sys import platform
|
from sys import platform
|
||||||
from os import path, mkdir, system
|
|
||||||
|
|
||||||
from math import *
|
from math import *
|
||||||
from gps import *
|
from gps import *
|
||||||
@ -67,7 +67,7 @@ def roydistance(lat1, lon1, lat2, lon2):
|
|||||||
# log
|
# log
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
if not path.isdir("logs"):
|
if not os.path.isdir("logs"):
|
||||||
mkdir("logs")
|
mkdir("logs")
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@ -355,7 +355,7 @@ class ConesWindow(MainWindow):
|
|||||||
cones = VirtualCones()
|
cones = VirtualCones()
|
||||||
cones.read_list(arg)
|
cones.read_list(arg)
|
||||||
self.vlists[count] = cones
|
self.vlists[count] = cones
|
||||||
self.labels[count].setText(path.basename(arg))
|
self.labels[count].setText(os.path.basename(arg))
|
||||||
self.lists[count].clear()
|
self.lists[count].clear()
|
||||||
|
|
||||||
for i in range(0, cones.num_cones):
|
for i in range(0, cones.num_cones):
|
||||||
@ -480,7 +480,7 @@ class ConesWindow(MainWindow):
|
|||||||
filename = self.write_dialog()
|
filename = self.write_dialog()
|
||||||
if filename == "":
|
if filename == "":
|
||||||
return
|
return
|
||||||
filename = path.basename(filename)
|
filename = os.path.basename(filename)
|
||||||
self.labels[list].setText(filename)
|
self.labels[list].setText(filename)
|
||||||
self.vlists[list].save_list(filename)
|
self.vlists[list].save_list(filename)
|
||||||
self.saves[list].hide()
|
self.saves[list].hide()
|
||||||
@ -593,7 +593,7 @@ if __name__ == '__main__':
|
|||||||
window.show()
|
window.show()
|
||||||
|
|
||||||
config = []
|
config = []
|
||||||
if path.isfile(config_file):
|
if os.path.isfile(config_file):
|
||||||
with open(config_file) 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:
|
||||||
|
|||||||
Reference in New Issue
Block a user