[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [oonib/master] Remove all nettest API related code.
commit f9181caa8d5805cec51b7ce37277f32553c726fa
Author: Arturo Filastò <art@xxxxxxxxx>
Date: Tue Aug 27 15:03:07 2013 +0200
Remove all nettest API related code.
---
oonib/nettest/api.py | 10 ----------
oonib/nettest/handlers.py | 27 ---------------------------
2 files changed, 37 deletions(-)
diff --git a/oonib/nettest/__init__.py b/oonib/nettest/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/oonib/nettest/api.py b/oonib/nettest/api.py
deleted file mode 100644
index 758b31d..0000000
--- a/oonib/nettest/api.py
+++ /dev/null
@@ -1,10 +0,0 @@
-from cyclone import web
-from oonib.nettest import handlers
-from oonib import config
-
-nettestAPI = [
- (r"/nettest", handlers.NetTestListHandler),
- (r"/nettest/([a-f0-9]{64})", handlers.NetTestDescHandler),
- (r"/nettest/([a-f0-9]{64})/py$", web.StaticFileHandler, {"path":
- config.main.nettest_dir}),
-]
diff --git a/oonib/nettest/handlers.py b/oonib/nettest/handlers.py
deleted file mode 100644
index b3ceed4..0000000
--- a/oonib/nettest/handlers.py
+++ /dev/null
@@ -1,27 +0,0 @@
-import glob
-import json
-import os
-import yaml
-
-from oonib.handlers import OONIBHandler
-from oonib import config, log
-
-class NetTestDescHandler(OONIBHandler):
- def get(self, netTestID):
- bn = os.path.basename(netTestID) + ".desc"
- try:
- with open(os.path.join(config.main.nettest_dir, bn)) as f:
- response = {}
- netTestDesc = yaml.safe_load(f)
- for k in ['name', 'description', 'version', 'author', 'date']:
- response[k] = netTestDesc[k]
- self.write(response)
- except IOError:
- log.err("No NetTest Descriptor found for id %s" % netTestID)
- self.set_status(404)
- self.write({'error': 'missing-nettest'})
-
- except Exception, e:
- log.err("Invalid NetTest Descriptor found for id %s" % netTestID)
- self.set_status(500)
- self.write({'error': 'invalid-nettest-descriptor'})
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits