Change indent level from 2 spaces to 4.

This commit is contained in:
Louis Taylor 2013-08-16 09:47:43 +01:00
parent f10c7fd19b
commit b38bbceb8a
1 changed files with 8 additions and 8 deletions

16
cheat
View File

@ -25,20 +25,20 @@ keyphrase = ' '.join(sys.argv[1:])
# print help if requested # print help if requested
if keyphrase in ['', 'help', '--help', '-h']: if keyphrase in ['', 'help', '--help', '-h']:
print "Usage: cheat [keyphrase]\n" print "Usage: cheat [keyphrase]\n"
print "Available keyphrases:" print "Available keyphrases:"
print "\n".join([name[0] for name in cheatsheets]) print "\n".join([name[0] for name in cheatsheets])
exit() exit()
sheet_found = False sheet_found = False
# print the cheatsheet if it exists # print the cheatsheet if it exists
for sheet in cheatsheets: for sheet in cheatsheets:
if keyphrase == sheet[0]: if keyphrase == sheet[0]:
cheatsheet_filename = os.path.join(sheet[1], keyphrase) cheatsheet_filename = os.path.join(sheet[1], keyphrase)
with open(cheatsheet_filename, 'r') as cheatsheet: with open(cheatsheet_filename, 'r') as cheatsheet:
print cheatsheet.read() print cheatsheet.read()
sheet_found = True sheet_found = True
# if it does not, say so # if it does not, say so
if not sheet_found: if not sheet_found:
print 'No cheatsheet found.' print 'No cheatsheet found.'