Skip to content

Commit ea65fbb

Browse files
committed
Provide quiet status specialization for python
1 parent 97d2ba3 commit ea65fbb

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

pxr/base/tf/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def Status(msg, verbose=True):
190190
codeInfo = GetCodeLocation(framesUp=1)
191191
_Status(msg, codeInfo[0], codeInfo[1], codeInfo[2], codeInfo[3])
192192
else:
193-
_Status(msg, "", "", "", 0)
193+
_Status(msg)
194194

195195
def RaiseCodingError(msg):
196196
"""Raise a coding error to the Tf Diagnostic system."""

pxr/base/tf/wrapStatus.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ _Status(string const &msg, string const& moduleName, string const& functionName,
5454
Post(msg);
5555
}
5656

57+
static void
58+
_QuietStatus(string const& msg)
59+
{
60+
TfDiagnosticMgr::StatusHelper(
61+
TfCallContext{},
62+
TF_DIAGNOSTIC_STATUS_TYPE,
63+
TfEnum::GetName(TfEnum(TF_DIAGNOSTIC_STATUS_TYPE)).c_str()).Post(msg);
64+
}
65+
5766
static string
5867
TfStatus__repr__(TfStatus const &self)
5968
{
@@ -70,6 +79,7 @@ TfStatus__repr__(TfStatus const &self)
7079

7180
void wrapStatus() {
7281
def("_Status", &_Status);
82+
def("_Status", &_QuietStatus);
7383

7484
typedef TfStatus This;
7585

0 commit comments

Comments
 (0)