[ARVADOS] updated: 462fbba4ab742a72a3cf057dc06610a51af6b0f0
git at public.curoverse.com
git at public.curoverse.com
Thu Aug 28 14:48:57 EDT 2014
Summary of changes:
crunch_scripts/crunchutil/subst.py | 5 ++---
crunch_scripts/run-command | 4 ++--
2 files changed, 4 insertions(+), 5 deletions(-)
via 462fbba4ab742a72a3cf057dc06610a51af6b0f0 (commit)
from 78317dade4e29b06f1f83b16603cc8ef5c42c434 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 462fbba4ab742a72a3cf057dc06610a51af6b0f0
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Thu Aug 28 14:48:49 2014 -0400
3719: Python style/wording fixes.
diff --git a/crunch_scripts/crunchutil/subst.py b/crunch_scripts/crunchutil/subst.py
index 13c6aa0..ff34863 100644
--- a/crunch_scripts/crunchutil/subst.py
+++ b/crunch_scripts/crunchutil/subst.py
@@ -2,8 +2,7 @@ import os
import glob
class SubstitutionError(Exception):
- def __init__(self, message):
- super(SubstitutionError, self).__init__(message)
+ pass
def search(c):
DEFAULT = 0
@@ -79,7 +78,7 @@ def do_substitution(p, c, subs=default_subs):
raise SubstitutionError("Unknown variable or function '%s' while performing substitution on '%s'" % (v, c))
if r is None:
raise SubstitutionError("Substitution for '%s' is null while performing substitution on '%s'" % (v, c))
- if not (isinstance(r, str) or isinstance(r, unicode)):
+ if not isinstance(r, basestring):
raise SubstitutionError("Substitution for '%s' must be a string while performing substitution on '%s'" % (v, c))
c = c[:m[0]] + r + c[m[1]+1:]
diff --git a/crunch_scripts/run-command b/crunch_scripts/run-command
index 48c8b58..c5fbcdf 100755
--- a/crunch_scripts/run-command
+++ b/crunch_scripts/run-command
@@ -173,12 +173,12 @@ try:
logger.info("{}{}{}".format(' '.join(cmd), (" < " + stdinname) if stdinname is not None else "", (" > " + stdoutname) if stdoutname is not None else ""))
except subst.SubstitutionError as e:
logger.error(str(e))
- logger.error("task parameters was:")
+ logger.error("task parameters were:")
logger.error(pprint.pformat(taskp))
sys.exit(1)
except Exception as e:
logger.exception("caught exception")
- logger.error("task parameters was:")
+ logger.error("task parameters were:")
logger.error(pprint.pformat(taskp))
sys.exit(1)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list