Package: pytrainer Tags: patch Hi,
I backported pytrainer 1.7.2-1 to lenny and tried to run it on a mipsel machine, but it failed to run with the following error: Unsupported sys.platform: linux2-mipsel. The attached patch fixed this problem. -- Matt http://ftbfs.org/kraai
--- pytrainer-1.7.2.orig/pytrainer/lib/system.py +++ pytrainer-1.7.2/pytrainer/lib/system.py @@ -37,7 +37,7 @@ self._setGpxDir() def _setHome(self): - if sys.platform == "linux2": + if sys.platform.startswith("linux2"): variable = 'HOME' elif sys.platform == "win32": variable = 'USERPROFILE' @@ -67,7 +67,7 @@ def _setConfFiles(self): if sys.platform == "win32": self.confdir = self.home+"/pytrainer" - elif sys.platform == "linux2": + elif sys.platform.startswith("linux2"): self.confdir = self.home+"/.pytrainer" else: print "Unsupported sys.platform: %s." % sys.platform