expect django greater than 2, and use open() instead of file() call
This commit is contained in:
parent
48b1054810
commit
e7e560a403
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue