From: Diane Trout Date: Mon, 10 Dec 2007 21:03:51 +0000 (+0000) Subject: [project @ moved check_option into benderjab] X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=60c6026e4679ed6610d9a12635249fed5a867656 [project @ moved check_option into benderjab] --- diff --git a/gaworkflow/copier.py b/gaworkflow/copier.py index 8f46836..265e780 100644 --- a/gaworkflow/copier.py +++ b/gaworkflow/copier.py @@ -145,17 +145,9 @@ class CopierBot(rpc.XmlRpcBot): """ super(CopierBot, self).read_config(section, configfile) - def check_option(name): - if self.cfg[name] is None: - errmsg="Please specify %s in the configfile" % (name) - logging.fatal(errmsg) - raise RuntimeError(errmsg) - else: - return self.cfg[name] - - password = check_option('rsync_password_file') - source = check_option('rsync_source') - destination = check_option('rsync_destination') + password = self._check_required_option('rsync_password_file') + source = self._check_required_option('rsync_source') + destination = self._check_required_option('rsync_destination') self.rsync = rsync(source, destination, password) self.notify_users = self._parse_user_list(self.cfg['notify_users'])