From 87bd7f8e7a8626ebe28df7ad306eae39d46a7a50 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Wed, 12 Apr 2017 23:32:32 +0200 Subject: [PATCH] [DEV] set back pulseaudio --- ...inux_pulse.py_ => lutinSystem_Linux_pulse.py} | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) rename lutin/z_system/{lutinSystem_Linux_pulse.py_ => lutinSystem_Linux_pulse.py} (81%) diff --git a/lutin/z_system/lutinSystem_Linux_pulse.py_ b/lutin/z_system/lutinSystem_Linux_pulse.py similarity index 81% rename from lutin/z_system/lutinSystem_Linux_pulse.py_ rename to lutin/z_system/lutinSystem_Linux_pulse.py index fc16aca..9567020 100644 --- a/lutin/z_system/lutinSystem_Linux_pulse.py_ +++ b/lutin/z_system/lutinSystem_Linux_pulse.py @@ -25,13 +25,23 @@ class System(system.System): return; dst_data = tools.file_read_data("/usr/include/pulse/version.h") lines = dst_data.split("\n") - patern = "#define pa_get_headers_version() (\"" + patern = "#define pa_get_headers_version() (\"" # " #corect edn error parsing version = None for line in lines: if line[:len(patern)] == patern: #Find the version line - version = line[len(patern)] - version2 = line[len(patern)+2] + offset = len(patern) + version = "" + while offset < len(line) \ + and line[offset] != '.': + version = line[offset] + offset += 1 + offset += 1 + version2 = "" + while offset < len(line) \ + and line[offset] != '.': + version2 = line[offset] + offset += 1 debug.verbose("detect version '" + version + "'") break; if version == None: