From efebf31c9c52e55ac595111b0d755c93ab33adfe Mon Sep 17 00:00:00 2001 From: Diana Picus Date: Fri, 26 Jan 2018 09:26:58 +0100 Subject: Clarify function interface. NFC Update comment to describe what happens if one of the parameters is None. Change-Id: Ide41de345c085a59f1b15c522c8c4cec67edfc69 --- modules/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/utils.py b/modules/utils.py index 4e779d8..c76b3fb 100644 --- a/modules/utils.py +++ b/modules/utils.py @@ -21,8 +21,9 @@ class CommandRunner(object): def consume(self, command, directory): """ Run the given command in the given directory and print the stdout and - stderr. If an exception is thrown while running the command, it will be - rethrown as a RuntimeError. + stderr. If 'directory' is None, the current working directory is used. + If an exception is thrown while running the command, it will be rethrown + as a RuntimeError. """ try: with Popen(command, stdout=PIPE, stderr=STDOUT, cwd=directory) as process: -- cgit v1.2.3