Permalink
Browse files

Fix bug in logging when shape export fails. Update shape export to us…

…e localized display for Subjects. Close #304.
  • Loading branch information...
1 parent 714100d commit 0c256bd8c3426274d4d29fbcacb4e782d3eaf0f0 Andrew Jennings committed Feb 27, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/publicmapping/redistricting/tasks.py
@@ -882,7 +882,7 @@ def plan2shape(plan):
}
}
elif ftype == OGRReal:
- definition = Subject.objects.get(name=definition).display
+ definition = Subject.objects.get(name=definition).get_label()
domain = {
'rdom': {
'rdommin': 0.0,
@@ -963,7 +963,7 @@ def plan2shape(plan):
os.rename(archive.name, DistrictFile.get_file_name(plan,True) + '.zip')
except Exception, ex:
logger.warn('The plan "%s" could not be saved to a shape file', plan.name)
- logger.debug('Reason:', ex)
+ logger.debug('Reason: %s', ex)
os.unlink(archive.name)
# delete the temporary csv file
finally:

0 comments on commit 0c256bd

Please sign in to comment.