blob: f723f703326802008bf13877ee96aec3716e2cff [file] [log] [blame]
Andrew Geissler4b740dc2020-05-05 08:54:39 -05001From 168ac446cdd9a1b59d6b708360a9556515ba56b9 Mon Sep 17 00:00:00 2001
2From: MilhouseVH <milhouseVH.github@nmacleod.com>
3Date: Sun, 16 Feb 2020 09:41:43 +0000
4Subject: [PATCH] fix python3 support
5
6https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/issues/197
7
8Upstream-Status: Backport
9Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
10---
11 rules/compat/map-variants.py | 6 +++---
12 1 file changed, 3 insertions(+), 3 deletions(-)
13
14diff --git a/rules/compat/map-variants.py b/rules/compat/map-variants.py
15index ebbfec9..979ba43 100755
16--- a/rules/compat/map-variants.py
17+++ b/rules/compat/map-variants.py
18@@ -1,4 +1,4 @@
19-#!/usr/bin/python3
20+#!/usr/bin/env python3
21
22 import argparse
23 import re
24@@ -12,8 +12,8 @@ class Layout(object):
25 assert variant is None
26 # parse a layout(variant) string
27 match = re.match(r'([^(]+)\(([^)]+)\)', layout)
28- self.layout = match[1]
29- self.variant = match[2]
30+ self.layout = match.groups()[0]
31+ self.variant = match.groups()[1]
32
33 def __str__(self):
34 if self.variant: