Tools: common.py : make some method statics

This commit is contained in:
Pierre Kancir 2018-07-12 11:44:37 +02:00 committed by Andrew Tridgell
parent 6c43ab27c1
commit 065a459df8

View File

@ -110,12 +110,14 @@ class AutoTest(ABC):
self.viewerip = viewerip
self.use_map = use_map
def progress(self, text):
@staticmethod
def progress(text):
"""Display autotest progress text."""
print("AUTOTEST: " + text)
# following two functions swiped from autotest.py:
def buildlogs_dirpath(self):
@staticmethod
def buildlogs_dirpath():
return os.getenv("BUILDLOGS", util.reltopdir("../buildlogs"))
def buildlogs_path(self, path):
@ -299,7 +301,8 @@ class AutoTest(ABC):
self.mavproxy.send('map set showgpspos 0\n')
self.mavproxy.send('map set showsimpos 0\n')
def mission_count(self, filename):
@staticmethod
def mission_count(filename):
"""Load a mission from a file and return number of waypoints."""
wploader = mavwp.MAVWPLoader()
wploader.load(filename)