Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Simplify name input checking

  • Loading branch information...
commit ceee43aaf217781cd5128651e76c8cfb084a97e5 1 parent 251f23b
@evansolomon authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.