Skip to content

Commit

Permalink
v0.4.3: Fix resource specification problem for SGE. Thanks to Zhengqi…
Browse files Browse the repository at this point in the history
…u Cai.
  • Loading branch information
chapmanb committed Mar 18, 2015
1 parent d3a5632 commit b026a32
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.3 (March 18, 2015)

- Fix resource specification problem for SGE. Thanks to Zhengqiu Cai.

## 0.4.2 (March 7, 2015)

- Additional IPython preparation cleanups to prevent race conditions. Thanks to
Expand Down
7 changes: 5 additions & 2 deletions cluster_helper/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,11 @@ def _prep_sge_resource(resource):
"""Prepare SGE resource specifications from the command line handling special cases.
"""
resource = resource.strip()
k, v = resource.split("=")
if k in set(["ar", "m", "M"]):
try:
k, v = resource.split("=")
except ValueError:
k, v = None, None
if k and k in set(["ar", "m", "M"]):
return "#$ -%s %s" % (k, v)
else:
return "#$ -l %s" % resource
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from setuptools import setup, find_packages

setup(name = "ipython-cluster-helper",
version = "0.4.2",
version = "0.4.3",
author = "Rory Kirchner",
author_email = "[email protected]",
description = "Simplify IPython cluster start up and use for multiple schedulers.",
Expand Down

0 comments on commit b026a32

Please sign in to comment.