diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2015-02-24 13:06:18 -0500 |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2015-02-24 13:06:55 -0500 |
commit | 0a0ec1c955da2e52f1be0f428a0bf6983308c063 (patch) | |
tree | 360cda39802d6b5bf567e58ae10afb849d8cced4 | |
parent | b658f6b70a6adc5e26349773e50045ab4c7236c2 (diff) | |
download | git-bz-0a0ec1c955da2e52f1be0f428a0bf6983308c063.tar.gz |
Add a useful help string when the version is unknown
https://bugzilla.gnome.org/show_bug.cgi?id=673828
-rwxr-xr-x | git-bz | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1192,6 +1192,14 @@ class Bug(object): response = self.server.get_xmlrpc_proxy().Bug.create(params) self.id = response['id'] except xmlrpclib.Fault, e: + if e.faultString.find("is no version named '") > 0: + print >>sys.stderr, e.faultString + print >>sys.stderr + print >>sys.stderr, "You can configure a version for %s with:" % self.server.host + print >>sys.stderr + print >>sys.stderr, " git config [--global] bz-tracker.%s.default-version <version>" % self.server.host + sys.exit(1) + die(e.faultString) except xmlrpclib.ProtocolError, e: if e.errcode == 404: |