From: Ben Widawsky Subject: [PATCH] list-workarounds: Convert to python3 Date: Fri, 10 May 2013 15:28:29 -0700 Message-ID: <1368224909-1589-1-git-send-email-ben@bwidawsk.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from shiva.localdomain (unknown [209.20.75.48]) by gabe.freedesktop.org (Postfix) with ESMTP id 61ED4E5EB1 for ; Fri, 10 May 2013 15:25:54 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org Cc: Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org The rest of the tool suite that uses python already uses python3. The tool configure requires python >= 3 (which is confusing because of the no backward compat problem). The world is slowly moving to python3. Converted with 2to3. CC: Damien Lespiau CC: Kenneth Graunke Signed-off-by: Ben Widawsky --- scripts/list-workarounds | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/list-workarounds b/scripts/list-workarounds index 6c8c636..b874fd8 100755 --- a/scripts/list-workarounds +++ b/scripts/list-workarounds @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os,sys import optparse @@ -29,7 +29,7 @@ wa_re = re.compile('(?PWa[A-Z0-9][a-zA-Z0-9_]+):(?P[a-z,]+)') waname_re = re.compile('(?PWa[A-Z0-9][a-zA-Z0-9_]+)') def parse(me): for line in me.splitlines(): - match = wa_re.search(line) + match = wa_re.search(str(line)) if not match: if not verbose: continue @@ -103,8 +103,8 @@ if __name__ == '__main__': sys.exit(1) parse(work_arounds) - for wa in sorted(workarounds.iterkeys()): + for wa in sorted(workarounds.keys()): if not options.platform: - print("%s: %s" % (wa, ', '.join(workarounds[wa]))) + print(("%s: %s" % (wa, ', '.join(workarounds[wa])))) elif options.platform in workarounds[wa]: print(wa) -- 1.8.2.2