diff --git a/HISTORY.md b/HISTORY.md index 341b716..7d4c38b 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -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 diff --git a/cluster_helper/cluster.py b/cluster_helper/cluster.py index 21549cf..ce9752e 100644 --- a/cluster_helper/cluster.py +++ b/cluster_helper/cluster.py @@ -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 diff --git a/setup.py b/setup.py index f32d301..9641049 100755 --- a/setup.py +++ b/setup.py @@ -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 = "rory.kirchner@gmail.com", description = "Simplify IPython cluster start up and use for multiple schedulers.",