'ignore' shouldn't be use for ascii conversion

The input string is not expected to contain any unicode characters
This commit is contained in:
John Jarvis
2013-11-19 14:34:06 -05:00
parent 4067a084ee
commit 693cfdea50
2 changed files with 2 additions and 2 deletions

View File

@@ -90,7 +90,7 @@ with open(CONFIG_ROOT / CONFIG_PREFIX + "env.json") as env_file:
STATIC_URL_BASE = ENV_TOKENS.get('STATIC_URL_BASE', None)
if STATIC_URL_BASE:
# collectstatic will fail if STATIC_URL is a unicode string
STATIC_URL = STATIC_URL_BASE.encode('ascii', 'ignore') + "/" + git.revision + "/"
STATIC_URL = STATIC_URL_BASE.encode('ascii') + "/" + git.revision + "/"
# GITHUB_REPO_ROOT is the base directory
# for course data

View File

@@ -113,7 +113,7 @@ if STATIC_ROOT_BASE:
STATIC_URL_BASE = ENV_TOKENS.get('STATIC_URL_BASE', None)
if STATIC_URL_BASE:
# collectstatic will fail if STATIC_URL is a unicode string
STATIC_URL = STATIC_URL_BASE.encode('ascii', 'ignore') + "/"
STATIC_URL = STATIC_URL_BASE.encode('ascii') + "/"
PLATFORM_NAME = ENV_TOKENS.get('PLATFORM_NAME', PLATFORM_NAME)
# For displaying on the receipt. At Stanford PLATFORM_NAME != MERCHANT_NAME, but PLATFORM_NAME is a fine default