Support for --version on the command line.

This commit is contained in:
grossmj committed 2014-05-01 19:34:58 -06:00
1 parent 2a888f93ce
commit 4ae7875010
2 files changed
+36 -7

No files matched your search

+24
View File
@@ -263,6 +263,30 @@ class IOU(IModule):
log.debug("received request {}".format(request))
def test_result(self, message, result="error"):
"""
"""
return {"result": result, "message": message}
@IModule.route("iou.test_settings")
def test_settings(self, request):
"""
"""
response = []
# test iourc
if self._iourc == "":
response.append(self.test_result("No iourc file has been added"))
elif not os.path.isfile(self._iourc):
response.append(self.test_result("iourc file {} is not accessible".format(self._iourc)))
else:
#TODO: check hostname + license inside the file
pass
self.send_response(response)
@IModule.route("iou.create")
def iou_create(self, request):
"""