From 33f76c7f7af81a0482eafffda84301d24f332536 Mon Sep 17 00:00:00 2001 From: lxoliva Date: Fri, 22 Jul 2011 13:21:46 +0000 Subject: [PATCH] Python 3.1 support by Michael kensington at astralcloak.net (thanks!) git-svn-id: http://www.fsfla.org/svn/fsfla/software/linux-libre/scripts@8036 559672b5-ba27-0410-b829-e8f1faed8b1b --- deblob-check | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/deblob-check b/deblob-check index b833bcb4b22f..100848b41aba 100755 --- a/deblob-check +++ b/deblob-check @@ -1,6 +1,6 @@ #! /bin/sh -# deblob-check version 2011-07-21 +# deblob-check version 2011-07-22 # Inspired in gNewSense's find-firmware script. # Written by Alexandre Oliva @@ -4813,13 +4813,13 @@ for line in sys.stdin: continue if verbose: - print 'looking for matches' + print('looking for matches') sfilenames = filenames while filenames != None: if filenames[1] is None: - print filenames[0] + print(filenames[0]) else: - print filenames[0] + ' within' + print(filenames[0] + ' within') filenames = filenames[1] filenames = sfilenames @@ -4834,25 +4834,25 @@ for line in sys.stdin: blobs = falses = 0 while 1: if verbose: - print 'found match' + print('found match') what = match.lastgroup if what == 'cblob': - if verbose: print 'match is a blob context' + if verbose: print('match is a blob context') pend = s.find ('\n', match.end()) + 1 if pend == 0: pend = len(s) p = match.start() + 1 - blob_p = 2 + blob_p = 2 else: blob_p = what == 'blob' assert blob_p or what == 'falsepos' if blob_p: - if verbose: print 'match is a blob' + if verbose: print('match is a blob') blobs += 1 else: - if verbose: print 'match is a false positive' + if verbose: print('match is a false positive') falses += 1 if blob_p and replace_blob or not blob_p and replace_falsepos: @@ -4884,7 +4884,7 @@ for line in sys.stdin: if not print_nomatch: sfilenames = filenames while filenames != None: - print '::: ' + filenames[0] + ' :::' + print('::: ' + filenames[0] + ' :::') filenames = filenames[1] filenames = sfilenames sys.stdout.write (s[pp:pend]) @@ -4893,9 +4893,9 @@ for line in sys.stdin: if list_blob and blobs or list_falsepos and falses: while filenames != None: if filenames[1] is None: - print filenames[0] + print(filenames[0]) else: - print filenames[0] + ' within' + print (filenames[0] + ' within') filenames = filenames[1] exit (1) @@ -4903,7 +4903,7 @@ for line in sys.stdin: sys.stdout.write(s[pp:]) if verbose: - print 'no further matches' + print('no further matches') s = '\n' filenames = nextfilenames -- 2.31.1