Merge branch 'master' of https://github.com/ritchielincoln/cheat into ritchielincoln-master

* 'master' of https://github.com/ritchielincoln/cheat:
  give user the option to edit cheatsheet when trying to create an existing cheatsheet
This commit is contained in:
Chris Lane 2013-09-07 18:43:13 -04:00
commit 64cba079f9

6
cheat
View File

@ -87,7 +87,11 @@ def edit_cheatsheet(cheat, cheatsheets):
def create_cheatsheet(cheat, cheatsheets):
"Create a new cheatsheet."
if cheat in cheatsheets:
print ('Cheatsheet "%s" already exists' % cheat)
print ('Cheatsheet "%s" already exists...' % cheat)
ans = raw_input('Would you like to edit cheatsheet for "%s" (Y/N)? ' % cheat)
if ans.lower() in ['y', 'yes']:
edit_cheatsheet(cheat, cheatsheets)
else:
exit()
import cheatsheets as cs