Skip to content

Commit

Permalink
Fix SHP file generation command
Browse files Browse the repository at this point in the history
  • Loading branch information
dodobas committed Oct 10, 2017
1 parent cb5ab0c commit 464759e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions django_project/core/settings/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,4 @@
EMAIL_USE_TLS = False
EMAIL_SUBJECT_PREFIX = '[healthsites]'

CLUSTER_CACHE_DIR = '/data/cache'
MEDIA_ROOT = '/data/media'

BROKER_URL = 'amqp://guest:guest@rabbitmq:5672//'
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ def insert_to_shapefile(healthsites, fields, shp_filename):
os.makedirs(directory_media)

filename = os.path.join(directory_media, shp_filename + '_shapefile.zip')
os.remove(filename)
try:
os.remove(filename)
except Exception:
pass

zipf = zipfile.ZipFile(filename, 'w', allowZip64=True)
zipdir(dir_cache, zipf)
Expand Down

0 comments on commit 464759e

Please sign in to comment.