mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Simplify _input_compat and str_compat
The __six__ module provides us these same constructs using different names.
This commit is contained in:
parent
ac90104103
commit
f6724cb960
1 changed files with 2 additions and 13 deletions
|
|
@ -77,19 +77,8 @@ CONF = {
|
|||
# url for list of valid timezones
|
||||
_TZ_URL = 'http://en.wikipedia.org/wiki/List_of_tz_database_time_zones'
|
||||
|
||||
|
||||
def _input_compat(prompt):
|
||||
if six.PY3:
|
||||
r = input(prompt)
|
||||
else:
|
||||
r = raw_input(prompt)
|
||||
return r
|
||||
|
||||
|
||||
if six.PY3:
|
||||
str_compat = str
|
||||
else:
|
||||
str_compat = unicode
|
||||
_input_compat = six.moves.input
|
||||
str_compat = six.text_type
|
||||
|
||||
|
||||
# Create a 'marked' default path, to determine if someone has supplied
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue