From d82602126fc975c9c2ae29db155f3efc8b9362b3 Mon Sep 17 00:00:00 2001 From: n1nj4sec Date: Thu, 21 Jan 2016 19:19:46 +0100 Subject: [PATCH] fix for androids --- pupy/pupylib/PupyClient.py | 6 ++++++ pupy/pupylib/PupyServer.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pupy/pupylib/PupyClient.py b/pupy/pupylib/PupyClient.py index f4658374..ff6602ab 100644 --- a/pupy/pupylib/PupyClient.py +++ b/pupy/pupylib/PupyClient.py @@ -56,6 +56,12 @@ class PupyClient(object): def is_unix(self): return not self.is_windows() + def is_linux(self): + return "linux" in self.desc["platform"].lower() + + def is_android(self): + return self.desc["platform"].lower()=="android" + def is_windows(self): if "windows" in self.desc["platform"].lower(): return True diff --git a/pupy/pupylib/PupyServer.py b/pupy/pupylib/PupyServer.py index 57fbfa0d..b84931ec 100644 --- a/pupy/pupylib/PupyServer.py +++ b/pupy/pupylib/PupyServer.py @@ -101,7 +101,7 @@ class PupyServer(threading.Thread): pass try: from kivy.utils import platform as kivy_plat#support for android - plat=kivy_plat + plat=bytes(kivy_plat) except ImportError: pass try: