Skip to content

Commit 64ec56d

Browse files
committed
Fix the build
1 parent dbd1708 commit 64ec56d

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

Diff for: .travis.yml

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
11
language: python
2+
23
services:
34
- postgresql
5+
6+
addons:
7+
postgresql: "9.6"
8+
apt:
9+
packages:
10+
- postgresql-9.6-postgis-2.3
11+
412
python:
513
- "2.7"
614
- "3.3"
715
- "3.4"
816
- "3.5"
917
- "3.6"
18+
1019
env:
1120
- DJANGO_VERSION='Django>=1.7,<1.8'
1221
- DJANGO_VERSION='Django>=1.8,<1.9'
1322
- DJANGO_VERSION='Django>=1.9,<1.10'
1423
- DJANGO_VERSION='Django>=1.10,<1.11'
1524
- DJANGO_VERSION='Django>=1.11,<2.0'
1625
- DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
26+
1727
matrix:
1828
exclude:
1929
- python: "3.5"
@@ -37,13 +47,16 @@ matrix:
3747
- python: "3.6"
3848
env: DJANGO_VERSION='Django>=1.8,<1.9'
3949
- env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz'
50+
4051
install:
4152
- pip install -q $DJANGO_VERSION
4253
- pip install -q django-model-utils flake8 psycopg2 six swapper tox tqdm
54+
4355
before_script:
44-
- psql -U postgres -c "create extension postgis"
56+
- psql -U postgres -c "CREATE EXTENSION postgis;"
4557
- psql -c 'create database django_cities;' -U postgres
46-
- psql -c 'CREATE EXTENSION postgis;' -U postgres -d django_cities
58+
- psql -U postgres -c 'CREATE EXTENSION postgis;' -d django_cities
59+
4760
script:
4861
- flake8 --ignore=E501
4962
- PYTHONPATH=. python test_project/manage.py test test_app --noinput

Diff for: cities/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def get_locales(self):
286286
try:
287287
locales.remove('LANGUAGES')
288288
locales += [e[0] for e in django_settings.LANGUAGES]
289-
except:
289+
except Exception:
290290
pass
291291

292292
return set([e.lower() for e in locales])

0 commit comments

Comments
 (0)