Skip to content

Commit

Permalink
Merge branch '0.6.x' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
remram44 committed Apr 22, 2015
2 parents 5b35db0 + 0fd7843 commit 5d07ed1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
=========

0.6.3 (???)
-----------

Bugfixes:
* Fixes reprounzip-vistrails failing because of reporting
* Fixes invalid escaping in VisTrails XML workflow
* Fixes docker run failing to read Docker's JSON output on Python 3

0.6.2 (2015-03-16)
------------------

Expand Down
2 changes: 1 addition & 1 deletion reprounzip-docker/reprounzip/unpackers/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def docker_run(args):

# Get exit status from "docker inspect"
out = subprocess.check_output(['docker', 'inspect', container])
outjson = json.loads(out)
outjson = json.loads(out.decode('ascii'))
if (outjson[0]["State"]["Running"] is not False or
outjson[0]["State"]["Paused"] is not False):
logging.error("Invalid container state after execution:\n%s",
Expand Down
10 changes: 8 additions & 2 deletions reprounzip-vistrails/reprounzip/plugins/vistrails.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ def hexdigest(self):
return self._hash.hexdigest()


def escape_xml(s):
"""Escapes for XML.
"""
return s.replace('&', '&').replace('"', '"')


def hash_experiment_run(run):
"""Generates a unique id from a single run of an experiment.
Expand Down Expand Up @@ -94,8 +100,8 @@ def do_vistrails(target):
vistrail = vistrail.format(
date='2014-11-12 15:31:18',
unpacker=unpacker,
directory=escape(str(target.absolute())),
cmdline=escape(cmdline),
directory=escape_xml(str(target.absolute())),
cmdline=escape_xml(cmdline),
module_name=module_name,
run=i)
fp.write(vistrail)
Expand Down
3 changes: 2 additions & 1 deletion reprounzip/reprounzip/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,8 @@ def enable_usage_report(enable):
def record_usage(**kwargs):
"""Records some info in the current usage report.
"""
_usage_report.note(kwargs)
if _usage_report is not None:
_usage_report.note(kwargs)


def record_usage_package(runs, packages, other_files, pack_id=None):
Expand Down
3 changes: 2 additions & 1 deletion reprozip/reprozip/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,8 @@ def enable_usage_report(enable):
def record_usage(**kwargs):
"""Records some info in the current usage report.
"""
_usage_report.note(kwargs)
if _usage_report is not None:
_usage_report.note(kwargs)


def record_usage_package(runs, packages, other_files, pack_id=None):
Expand Down

0 comments on commit 5d07ed1

Please sign in to comment.