MCPcopy
hub / github.com/shadowsocks/shadowsocks / get

Method get

tests/coverage_server.py:23–37  ·  view source on GitHub ↗
(self, project)

Source from the content-addressed store, hash-verified

21
22 class MainHandler(tornado.web.RequestHandler):
23 def get(self, project):
24 try:
25 with open('/tmp/%s-coverage' % project, 'rb') as f:
26 coverage = f.read().strip()
27 n = int(coverage.strip('%'))
28 if n >= 80:
29 color = 'brightgreen'
30 else:
31 color = 'yellow'
32 self.redirect(('https://img.shields.io/badge/'
33 'coverage-%s-%s.svg'
34 '?style=flat') %
35 (urllib.quote(coverage), color))
36 except IOError:
37 raise tornado.web.HTTPError(404)
38
39 application = tornado.web.Application([
40 (r"/([a-zA-Z0-9\-_]+)", MainHandler),

Callers 15

EVP_BytesToKeyFunction · 0.80
get_method_infoMethod · 0.80
mainFunction · 0.80
_call_callbackMethod · 0.80
_handle_dataMethod · 0.80
remove_callbackMethod · 0.80
resolveMethod · 0.80
__init__Method · 0.80
_handle_serverMethod · 0.80
_handle_clientMethod · 0.80
check_configFunction · 0.80
get_configFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected