# HG changeset patch # User madrouin@astronotus.lmd.polytechnique.fr # Date 1533722079 -7200 # Node ID 4fcec88bfe3d27a664a82ad5759d2b6d08a0886a # Parent 111f05973553d40f039b7a010b3fe50382b81e06 add same option for process function and method diff -r 111f05973553 -r 4fcec88bfe3d scc_access/scc_access.py --- a/scc_access/scc_access.py Wed Aug 08 11:50:12 2018 +0200 +++ b/scc_access/scc_access.py Wed Aug 08 11:54:39 2018 +0200 @@ -203,13 +203,13 @@ if monitor: self.monitor_processing(measurement_id) - def process(self, filename, system_id): + def process(self, filename, system_id, rs_filename=None): """ Upload a file for processing and wait for the processing to finish. If the processing is successful, it will download all produced files. """ logger.info("--- Processing started on %s. ---" % datetime.datetime.now()) # Upload file - measurement_id = self.upload_file(filename, system_id) + measurement_id = self.upload_file(filename, system_id, rs_filename=rs_filename) measurement = self.monitor_processing(measurement_id) return measurement @@ -429,13 +429,13 @@ return measurement_id -def process_file(filename, system_id, settings): +def process_file(filename, system_id, settings, rs_filename=None): """ Shortcut function to process a file to the SCC. """ logger.info("Processing file %s, using sytem %s" % (filename, system_id)) scc = SCC(settings['basic_credentials'], settings['output_dir'], settings['base_url']) scc.login(settings['website_credentials']) - measurement = scc.process(filename, system_id) + measurement = scc.process(filename, system_id, rs_filename=rs_filename) scc.logout() return measurement