Skip to content

Commit

Permalink
Fixes to transformation
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Mahn committed Sep 26, 2016
1 parent 8efbc53 commit cc2e64c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/convert/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import transform_obs

from glob import glob
from contextlib import closing
from shutil import copyfile

from general_tools.file_utils import add_file_to_zip

Expand Down Expand Up @@ -106,4 +106,4 @@ def handle(event, context):
'errors': errors,
'warnings': warnings,
'success': success
}
}
6 changes: 6 additions & 0 deletions functions/convert/transform_obs.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
import string

from glob import glob
from shutil import copyfile
from general_tools.file_utils import unzip, make_dir, write_file
from general_tools.url_utils import download_file
from door43_tools.obs_handler import OBSInspection


class TransformOBS(object):

def __init__(self, source_url, output_dir, options):
Expand Down Expand Up @@ -92,6 +94,10 @@ def run(self):
write_file(os.path.join(self.output_dir, html_filename), html)
self.log_message('Converted {0} to {1}.'.format(os.path.basename(filename), os.path.basename(html_filename)))

manifest_file = os.path.join(self.files_dir, 'manifest.json')
if os.path.isfile(manifest_file):
copyfile(manifest_file, os.path.join(self.output_dir, 'manifest.json'))

# Do the OBS inspection
warnings = OBSInspection(self.output_dir).run()
for warning in warnings:
Expand Down

0 comments on commit cc2e64c

Please sign in to comment.