-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Command: Add .check_call(), .check_output()
Working like the subprocess equivalents Also, Command.__call__ is now delegating to .check_output()
- Loading branch information
1 parent
3a2b9ed
commit 7427d1c
Showing
4 changed files
with
149 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"""nodely exceptions.""" | ||
|
||
from subprocess import CalledProcessError | ||
|
||
__all__ = ('NodeCommandError', ) | ||
|
||
|
||
class NodeCommandError(CalledProcessError): | ||
"""A Node.js command returned non-zero exit code""" | ||
|
||
def __init__(self, returncode, cmd, cwd): | ||
super().__init__(returncode=returncode, cmd=cmd) | ||
self.cwd = cwd | ||
self.args += (cwd, ) | ||
|
||
def __str__(self): | ||
return "{} in working directory {!r}".format( | ||
super().__str__(), self.cwd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters