Skip to content

Commit

Permalink
Tidy up a bit more
Browse files Browse the repository at this point in the history
  • Loading branch information
znicholls committed Jul 5, 2019
1 parent 96f2549 commit f317ba8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pymagicc/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ def run(self, scenario=None, only=None, debug=False, **kwargs):
``output.metadata["parameters"]`` where ``output`` is the returned object.
Any logged output from running magicc will be in``output.metadata["stderr"]``.
The level of logging can be controlled with the ``debug`` argument.
For MAGICC7 and above, The level of logging can be controlled with the
``debug`` argument.
Parameters
----------
Expand Down Expand Up @@ -283,6 +284,9 @@ def run(self, scenario=None, only=None, debug=False, **kwargs):
subprocess.CalledProcessError
If MAGICC fails to run. Check the 'stderr' key of the result's `metadata`
attribute to inspect the results output from MAGICC.
ValueError
The user attempts to use ``debug`` with MAGICC6
"""
if not exists(self.root_dir):
raise FileNotFoundError(self.root_dir)
Expand Down Expand Up @@ -379,7 +383,8 @@ def run(self, scenario=None, only=None, debug=False, **kwargs):
for l in levels_to_warn:
if l in mdata.metadata["stderr"]:
warnings.warn(
"magicc logged a {} message. Check the 'stderr' key of the result's `metadata` attribute".format(
"magicc logged a {} message. Check the 'stderr' key of the "
"result's `metadata` attribute.".format(
l
)
)
Expand Down

0 comments on commit f317ba8

Please sign in to comment.