diff options
author | James Vasile <james@jamesvasile.com> | 2012-02-19 14:41:40 -0500 |
---|---|---|
committer | James Vasile <james@jamesvasile.com> | 2012-02-19 15:07:16 -0500 |
commit | 992eff9e1308c8c5bc6b16fdefd1ea456049c984 (patch) | |
tree | 79c116bfa1e2153f18b2c469a456112fa0907993 /modules | |
parent | c9b09c5de25b7505cac7ad3f9a968ec375adac53 (diff) |
flesh out santiago and apache config a bit
Diffstat (limited to 'modules')
-rw-r--r-- | modules/installed/santiago/santiago.py | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/modules/installed/santiago/santiago.py b/modules/installed/santiago/santiago.py index 169e9d7..38e6512 100644 --- a/modules/installed/santiago/santiago.py +++ b/modules/installed/santiago/santiago.py @@ -5,7 +5,7 @@ with information. There is authentication involved, although I haven't figured that one all the way through yet. """ -import os +import os, sys import cherrypy import simplejson as json from gettext import gettext as _ @@ -16,22 +16,22 @@ import util as u santiago_port = 52854 -import gnupg +#import gnupg -def check_sig(query, sig): - "Verify that the sig and the query match" - gpg = gnupg.GPG(gnupghome='/home/james/') - return True +#def check_sig(query, sig): +# "Verify that the sig and the query match" +# gpg = gnupg.GPG(gnupghome='/home/james/') +# return True class Santiago(PagePlugin): - order = 90 # order of running init in PagePlugins - def __init__(self, *args, **kwargs): + order = 90 # order of running init in PagePlugins + def __init__(self, *args, **kwargs): self.register_page("santiago") self.santiago_address = self.get_santiago_address() #TODO: multiple santiago ports #set a listener on the santiago address - def get_santiago_address(self): + def get_santiago_address(self): if 'santiago' in cfg.users['admin'] and 'address' in cfg.users['admin']['santiago']: return cfg.users['admin']['santiago']['address'] else: @@ -55,11 +55,11 @@ class Santiago(PagePlugin): print "Need to add these two lines to /etc/torrc:\n%s" % hidden_service_config return "" - def check_for_hidden_service(self): + def check_for_hidden_service(self): pass - @cherrypy.expose - def index(self, *args, **kw): + @cherrypy.expose + def index(self, *args, **kw): """ A request is a dict with some required keys: @@ -112,12 +112,12 @@ class Santiago(PagePlugin): ## Plinth page to config santiago class santiago(PagePlugin): - def __init__(self, *args, **kwargs): - PagePlugin.__init__(self, *args, **kwargs) - self.menu = cfg.html_root.privacy.menu.add_item("Santiago", "/privacy/santiago", 10) - self.register_page("privacy.santiago") - - @cherrypy.expose - @require() - def index(self): - return "Santiago's config goes here." + def __init__(self, *args, **kwargs): + PagePlugin.__init__(self, *args, **kwargs) + self.menu = cfg.html_root.privacy.menu.add_item("Santiago", "/privacy/santiago", 10) + self.register_page("privacy.santiago") + + @cherrypy.expose + @require() + def index(self): + return "Santiago's config goes here." |