Skip to content

Commit

Permalink
usdt.py: print errors to stderr in enable_probe_or_bail()
Browse files Browse the repository at this point in the history
  • Loading branch information
gfx authored and yonghong-song committed Mar 6, 2020
1 parent c421970 commit aeea0e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/python/bcc/usdt.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function
import ctypes as ct
import os, sys
from .libbcc import lib, _USDT_CB, _USDT_PROBE_CB, \
Expand Down Expand Up @@ -160,7 +161,7 @@ def enable_probe_or_bail(self, probe, fn_name):
try:
self.enable_probe(probe, fn_name)
except USDTException as e:
print(e)
print(e, file=sys.stderr)
sys.exit(1)

def get_context(self):
Expand Down

0 comments on commit aeea0e9

Please sign in to comment.