Skip to content

Commit

Permalink
Merge pull request #449 from xylar/add_env_to_check_call
Browse files Browse the repository at this point in the history
Add keyword arguments to `check_call`
  • Loading branch information
xylar authored Nov 26, 2021
2 parents e78428c + a749ecf commit d3244d5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions conda_package/docs/versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Documentation On GitHub
`v0.9.0`_ `0.9.0`_
`v0.10.0`_ `0.10.0`_
`v0.11.0`_ `0.11.0`_
`v0.12.0`_ `0.12.0`_
================ ===============

.. _`stable`: ../stable/index.html
Expand Down Expand Up @@ -62,3 +63,5 @@ Documentation On GitHub
.. _`0.10.0`: https://github.com/MPAS-Dev/MPAS-Tools/tree/0.10.0
.. _`v0.11.0`: ../0.11.0/index.html
.. _`0.11.0`: https://github.com/MPAS-Dev/MPAS-Tools/tree/0.11.0
.. _`v0.12.0`: ../0.12.0/index.html
.. _`0.12.0`: https://github.com/MPAS-Dev/MPAS-Tools/tree/0.12.0
2 changes: 1 addition & 1 deletion conda_package/mpas_tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version_info__ = (0, 11, 0)
__version_info__ = (0, 12, 0)
__version__ = '.'.join(str(vi) for vi in __version_info__)
7 changes: 5 additions & 2 deletions conda_package/mpas_tools/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import subprocess


def check_call(args, logger):
def check_call(args, logger, **kwargs):
"""
Call the given subprocess with logging to the given logger.
Expand All @@ -15,6 +15,9 @@ def check_call(args, logger):
logger : logging.Logger
The logger to write output to
kwargs : dict
Keyword arguments to pass to subprocess.Popen
Raises
------
subprocess.CalledProcessError
Expand All @@ -23,7 +26,7 @@ def check_call(args, logger):
"""

process = subprocess.Popen(args, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stderr=subprocess.PIPE, **kwargs)
stdout, stderr = process.communicate()

if stdout:
Expand Down
2 changes: 1 addition & 1 deletion conda_package/recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set name = "mpas_tools" %}
{% set version = "0.11.0" %}
{% set version = "0.12.0" %}

package:
name: {{ name|lower }}
Expand Down

0 comments on commit d3244d5

Please sign in to comment.