s4/script/depfilter.py: use py3 compatible regex import
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Sat, 27 Oct 2018 22:11:41 +0000 (11:11 +1300)
committerDouglas Bagnall <dbagnall@samba.org>
Thu, 1 Nov 2018 04:08:10 +0000 (05:08 +0100)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <noel.power@suse.com>
source4/script/depfilter.py

index ffe628ef94c335e8d346aa8f48833c064af00524..f2152538fb3f6d2bbbf5c598bd4291a296b7cc5f 100755 (executable)
@@ -8,7 +8,7 @@
 
 from __future__ import print_function
 import sys
-import sre
+import re
 
 if len(sys.argv) != 2:
     print('Usage: depfilter.py NODE')
@@ -23,7 +23,7 @@ lines = sys.stdin.readlines()
 graph = {}
 
 for arc in lines[1:-1]:
-    match = sre.search('"(.*)" -> "(.*)"', arc)
+    match = re.search('"(.*)" -> "(.*)"', arc)
     n1, n2 = match.group(1), match.group(2)
     if n1 not in graph:
         graph[n1] = []