Please be aware that copy and paste of the code below will most probably lead to indention error, as the code was more or less just a copy of respective passages in real code.
import re
RE_ENV_NON_DEV = re.compile('^INT|KONS|PROD$')
env = input('Please enter the instance ( INT KONS PROD ) ' +
'to deploy to: ')
while env is None or RE_ENV_NON_DEV.match(env) is None:
env = input('Please enter the instance ( INT KONS PROD ) ' +
'to deploy to: ')
Keine Kommentare:
Kommentar veröffentlichen