mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-28 01:53:48 +08:00
Fix for newer ubuntus
This commit is contained in:
committed by
GitHub
parent
4aedbf1590
commit
0e604606b2
@@ -12,6 +12,7 @@ import shutil
|
||||
import datetime
|
||||
import subprocess
|
||||
import sys
|
||||
import lsb_release
|
||||
|
||||
lib_path = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'sw', 'lib', 'python'))
|
||||
sys.path.append(lib_path)
|
||||
@@ -21,6 +22,12 @@ from paparazzi_health import PaparazziOverview
|
||||
|
||||
import xml.etree.ElementTree
|
||||
|
||||
release = lsb_release.get_distro_information()
|
||||
isLegacy = False
|
||||
if release['ID'] == 'Ubuntu':
|
||||
if release['RELEASE'] == '18.04' or release['RELEASE'] == '16.04':
|
||||
isLegacy = True
|
||||
|
||||
|
||||
class ConfChooser(object):
|
||||
|
||||
@@ -154,6 +161,9 @@ class ConfChooser(object):
|
||||
if self.btnPythonGUI.get_active():
|
||||
args += ["-python"]
|
||||
|
||||
if isLegacy:
|
||||
args += ["-legacy"]
|
||||
|
||||
self.pp = subprocess.Popen(args)
|
||||
self.window.destroy()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user