From 7cf6291c8adedd4065441c1adcb32b1fa882f0e5 Mon Sep 17 00:00:00 2001 From: John Shanahan Date: Wed, 14 Aug 2013 10:36:00 -0400 Subject: [PATCH] Changed from 2-spaces per indentation level to 4, per PEP-8 standard. --- cheat | 18 +++++++++--------- install | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cheat b/cheat index ad69b44..856a419 100755 --- a/cheat +++ b/cheat @@ -8,8 +8,8 @@ cheat_dir = os.path.expanduser('~') + '/.cheat/' # verify that the ~/.cheat directory exists if not os.path.isdir(cheat_dir): - print >> sys.stderr, 'The ~/.cheat directory does not exist.' - exit() + print >> sys.stderr, 'The ~/.cheat directory does not exist.' + exit() # list the files in the ~/.cheat directory cheatsheets = os.listdir(cheat_dir) @@ -17,16 +17,16 @@ cheatsheets.sort() # print help if requested if keyphrase in ['', 'help', '--help', '-h']: - print "Usage: cheat [keyphrase]\n" - print "Available keyphrases:" - print "\n".join(cheatsheets) - exit() + print "Usage: cheat [keyphrase]\n" + print "Available keyphrases:" + print "\n".join(cheatsheets) + exit() # print the cheatsheet if it exists if keyphrase in cheatsheets: - with open (cheat_dir + keyphrase, 'r') as cheatsheet: - print cheatsheet.read() + with open (cheat_dir + keyphrase, 'r') as cheatsheet: + print cheatsheet.read() # if it does not, say so else: - print 'No cheatsheet found.' + print 'No cheatsheet found.' diff --git a/install b/install index cf64c1f..4d55ab8 100755 --- a/install +++ b/install @@ -4,9 +4,9 @@ import shutil import sys try: - shutil.copy('./cheat', '/usr/local/bin/') - shutil.copytree('./.cheat', expanduser('~') + '/.cheat') - print "cheat has been installed successfully." + shutil.copy('./cheat', '/usr/local/bin/') + shutil.copytree('./.cheat', expanduser('~') + '/.cheat') + print "cheat has been installed successfully." except IOError as e: - print >> sys.stderr, "This installer must be run as root." - sys.exit(1) + print >> sys.stderr, "This installer must be run as root." + sys.exit(1)