Skip to content

Commit

Permalink
Fix for export when path may not exist. Closes #856.
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxfish committed Aug 9, 2012
1 parent c391021 commit 73e373a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions panda/tasks/export_search.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ def run(self, query, task_status_id, filename=None, *args, **kwargs):


path = os.path.join(settings.EXPORT_ROOT, filename) path = os.path.join(settings.EXPORT_ROOT, filename)
zip_path = os.path.join(settings.EXPORT_ROOT, zip_name) zip_path = os.path.join(settings.EXPORT_ROOT, zip_name)

zipfile = ZipFile(zip_path, 'w')


try: try:
os.makedirs(os.path.realpath(path)) os.makedirs(os.path.realpath(path))
except: except:
pass pass

zipfile = ZipFile(zip_path, 'w')


response = solr.query_grouped( response = solr.query_grouped(
settings.SOLR_DATA_CORE, settings.SOLR_DATA_CORE,
Expand Down

0 comments on commit 73e373a

Please sign in to comment.