Strip trailing slash from BLENDER_ID_ENDPOINT URL

This commit is contained in:
Sybren A. Stüvel 2016-03-04 12:13:40 +01:00
parent ef0441b4c7
commit 31a1694ba7

View File

@ -1,5 +1,6 @@
import os import os
import requests import requests
from datetime import datetime from datetime import datetime
from datetime import timedelta from datetime import timedelta
from flask import g from flask import g
@ -10,6 +11,7 @@ from eve.methods.post import post_internal
from application import app from application import app
class SystemUtility(): class SystemUtility():
def __new__(cls, *args, **kwargs): def __new__(cls, *args, **kwargs):
raise TypeError("Base class may not be instantiated") raise TypeError("Base class may not be instantiated")
@ -20,7 +22,7 @@ class SystemUtility():
is defined, it's possible to override the (default) production address. is defined, it's possible to override the (default) production address.
""" """
return os.environ.get( return os.environ.get(
'BLENDER_ID_ENDPOINT', "https://www.blender.org/id") 'BLENDER_ID_ENDPOINT', "https://www.blender.org/id").rstrip('/')
def validate(token): def validate(token):