Merge pull request #571 from srouquette/python3

Fix gmock_doctor.py for Python3
This commit is contained in:
Billy Donahue 2015-08-30 12:09:32 -04:00
commit 24ecc348b9

View File

@ -599,7 +599,7 @@ def main():
print ('Please copy and paste the compiler errors here. Press c-D when ' print ('Please copy and paste the compiler errors here. Press c-D when '
'you are done:') 'you are done:')
else: else:
print 'Waiting for compiler errors on stdin . . .' print ('Waiting for compiler errors on stdin . . .')
msg = sys.stdin.read().strip() msg = sys.stdin.read().strip()
diagnoses = Diagnose(msg) diagnoses = Diagnose(msg)
@ -617,18 +617,18 @@ If you send your source code and the compiler's error messages to
%s, you can be helped and I can get smarter -- %s, you can be helped and I can get smarter --
win-win for us!""" % (msg, _EMAIL)) win-win for us!""" % (msg, _EMAIL))
else: else:
print '------------------------------------------------------------' print ('------------------------------------------------------------')
print 'Your code appears to have the following', print ('Your code appears to have the following',)
if count > 1: if count > 1:
print '%s diseases:' % (count,) print ('%s diseases:' % (count,))
else: else:
print 'disease:' print ('disease:')
i = 0 i = 0
for d in diagnoses: for d in diagnoses:
i += 1 i += 1
if count > 1: if count > 1:
print '\n#%s:' % (i,) print ('\n#%s:' % (i,))
print d print (d)
print (""" print ("""
How did I do? If you think I'm wrong or unhelpful, please send your How did I do? If you think I'm wrong or unhelpful, please send your
source code and the compiler's error messages to %s. source code and the compiler's error messages to %s.