File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""A Python Riemann client and command line tool"""
22
3- __version__ = '4.0.1 '
3+ __version__ = '4.1.0-dev '
44__author__ = 'Sam Clements <sam.clements@datasift.com>'
Original file line number Diff line number Diff line change 44
55import argparse
66import json
7+ import sys
78import os
89
910import riemann_client .client
@@ -102,4 +103,9 @@ def main():
102103 transport = transport_class (args .host , args .port )
103104
104105 with riemann_client .client .Client (transport = transport ) as client :
105- args .function (args , client )
106+ try :
107+ args .function (args , client )
108+ except riemann_client .transport .RiemannError as exception :
109+ print ("The Riemann server responded with an error: {}" .format (
110+ exception .message ), file = sys .stderr )
111+ exit (1 )
Original file line number Diff line number Diff line change 44
55setuptools .setup (
66 name = 'riemann-client' ,
7- version = '4.0.1 ' ,
7+ version = '4.1.0-dev ' ,
88
99 author = "Sam Clements" ,
1010 author_email = "sam.clements@datasift.com" ,
You can’t perform that action at this time.
0 commit comments