[27285] in Source-Commits
scripts commit: Add "test" command to trac-remote
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Thu Sep 19 10:52:23 2013
Date: Thu, 19 Sep 2013 10:52:14 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201309191452.r8JEqERI019747@drugstore.mit.edu>
To: source-commits@MIT.EDU
https://github.com/mit-athena/scripts/commit/f6f2b73bf33bd1c69932232cee24462353e956b5
commit f6f2b73bf33bd1c69932232cee24462353e956b5
Author: Jonathan Reed <jdreed@mit.edu>
Date: Mon Sep 9 15:31:42 2013 -0400
Add "test" command to trac-remote
Add a "test" command to test the connection to the server
trac-remote.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/trac-remote.py b/trac-remote.py
index c89f3d3..12eefbe 100755
--- a/trac-remote.py
+++ b/trac-remote.py
@@ -64,6 +64,13 @@ class Trac:
self._update(ticket_id, comment,
{"action": "committed"}, True, author)
+ def test(self):
+ try:
+ response = self._server.system.getAPIVersion()
+ print "API Version: ", response
+ except xmlrpclib.Fault, e:
+ print >>sys.stderr, e.message
+ sys.exit(1)
if __name__ == '__main__':
parser = OptionParser()