Created
May 29, 2012 12:11
-
-
Save lyrixx/2828098 to your computer and use it in GitHub Desktop.
Fabfile, promp with a list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i = 0 | |
for dump in dumps: | |
print cyan('%(i)s => %(dump)s' % {'i':i, 'dump':dump}) | |
i += 1 | |
def validateDumpNumber(arg): | |
if i < int(arg): | |
raise Exception('You have to choose an int among [0-%(i)s], not %(arg)s' % {'i':i, 'arg':arg}) | |
return arg | |
dumpChoosen = prompt(cyan('{Dump} Choose a dump to restore'), validate=validateDumpNumber, default=0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment