Skip to content

Commit f5e9814

Browse files
committed
Fix python3 tests, remove ascii_lowercase object
1 parent 804df05 commit f5e9814

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

flask_script/_compat.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def reraise(tp, value, tb=None):
4848
get_next = lambda x: x.__next__
4949

5050
input = input
51-
from string import ascii_lowercase
5251

5352
else:
5453
unichr = unichr
@@ -88,7 +87,6 @@ def encode_filename(filename):
8887
return filename
8988

9089
input = raw_input
91-
from string import lower as ascii_lowercase
9290

9391

9492
def with_metaclass(meta, *bases):

flask_script/cli.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# -*- coding: utf-8 -*-
22

33
import getpass
4-
from ._compat import string_types, ascii_lowercase, input
4+
from ._compat import string_types, input
5+
56

67
def prompt(name, default=None):
78
"""
@@ -63,8 +64,7 @@ def prompt_bool(name, default=False, yes_choices=None, no_choices=None):
6364
return False
6465

6566

66-
def prompt_choices(name, choices, default=None, resolve=ascii_lowercase,
67-
no_choice=('none',)):
67+
def prompt_choices(name, choices, default=None, no_choice=('none',)):
6868
"""
6969
Grabs user input from command line from set of provided choices.
7070
@@ -87,8 +87,7 @@ def prompt_choices(name, choices, default=None, resolve=ascii_lowercase,
8787
_choices.append(choice)
8888

8989
while True:
90-
rv = prompt(name + ' - (%s)' % ', '.join(options), default)
91-
rv = resolve(rv)
90+
rv = prompt(name + ' - (%s)' % ', '.join(options), default).lower()
9291
if rv in no_choice:
9392
return None
9493
if rv in _choices or rv == default:

0 commit comments

Comments
 (0)