Permalink
Browse files

Simplify name input checking

  • Loading branch information...
1 parent 251f23b commit ceee43aaf217781cd5128651e76c8cfb084a97e5 @evansolomon committed Aug 19, 2012
Showing with 3 additions and 8 deletions.
  1. +3 −8 _sh
View
11 _sh
@@ -15,14 +15,9 @@ print "Let's get started.\n"
# Get your theme name
name = raw_input('Name? ')
-# You need to provide at least a name
-while not name:
- print "\nYou need a name for your theme.\n\n"
- name = raw_input('Name? ')
-
-# ... and it needs to be unique
-while os.path.exists(name) or os.path.exists(name + '.zip'):
- print "\nYou should pick a name that isn't already used for a file or directory.\n\n"
+# You need to provide a unique name for the theme
+while not name or os.path.exists(name) or os.path.exists(name + '.zip'):
+ print "\nYou need a name for your theme that doesn't match existing files or directories.\n\n"
name = raw_input('Name? ')
# Get the rest of your customizations

0 comments on commit ceee43a

Please sign in to comment.