expect django greater than 2, and use open() instead of file() call

This commit is contained in:
jeffrey forman 2019-02-14 07:51:31 -05:00
parent 48b1054810
commit e7e560a403
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ language: python
python:
- "3.6"
env:
- DJANGO="Django>=2"
- DJANGO="Django>2.1"
install:
- pip install -q $DJANGO
- pip install -r requirements.txt

View File

@ -70,7 +70,7 @@ except IOError:
try:
from random import choice
SECRET_KEY = ''.join([choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)])
secret = file(SECRET_FILE, 'w')
secret = open(SECRET_FILE, 'w')
secret.write(SECRET_KEY)
secret.close()
except IOError: