mirror of
https://github.com/LibreELEC/LibreELEC.tv
synced 2025-09-24 19:46:01 +07:00
35 lines
1.0 KiB
Diff
35 lines
1.0 KiB
Diff
From bb68466121aa7a4fd5e5af0ef781235b8dbc4ce7 Mon Sep 17 00:00:00 2001
|
|
From: MilhouseVH <milhouseVH.github@nmacleod.com>
|
|
Date: Sun, 16 Feb 2020 09:41:43 +0000
|
|
Subject: [PATCH] fix python3 support
|
|
|
|
https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/issues/197
|
|
---
|
|
rules/compat/map-variants.py | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/rules/compat/map-variants.py b/rules/compat/map-variants.py
|
|
index ebbfec9..979ba43 100755
|
|
--- a/rules/compat/map-variants.py
|
|
+++ b/rules/compat/map-variants.py
|
|
@@ -1,4 +1,4 @@
|
|
-#!/usr/bin/python3
|
|
+#!/usr/bin/env python3
|
|
|
|
import argparse
|
|
import re
|
|
@@ -12,8 +12,8 @@ class Layout(object):
|
|
assert variant is None
|
|
# parse a layout(variant) string
|
|
match = re.match(r'([^(]+)\(([^)]+)\)', layout)
|
|
- self.layout = match[1]
|
|
- self.variant = match[2]
|
|
+ self.layout = match.groups()[0]
|
|
+ self.variant = match.groups()[1]
|
|
|
|
def __str__(self):
|
|
if self.variant:
|
|
--
|
|
2.7.4
|
|
|