]> sipb.mit.edu Git - ikiwiki.git/blobdiff - plugins/proxy.py
fix transition call
[ikiwiki.git] / plugins / proxy.py
index 55c552ab22e30aab59c2a10c3192bd9a30e7ebea..6f9b1f8525821645d1dee6580864ec3b9e320473 100644 (file)
@@ -88,7 +88,7 @@ class _IkiWikiExtPluginXMLRPCHandler(object):
 
     @staticmethod
     def _write(out_fd, data):
-        out_fd.write(data)
+        out_fd.write(str(data))
         out_fd.flush()
 
     @staticmethod
@@ -151,7 +151,7 @@ class IkiWikiProcedureProxy(object):
         self._xmlrpc_handler = _IkiWikiExtPluginXMLRPCHandler(self._debug_fn)
         self._xmlrpc_handler.register_function(self._importme, name='import')
 
-    def register_hook(self, type, function):
+    def hook(self, type, function):
         self._hooks.append((type, function.__name__))
         self._xmlrpc_handler.register_function(function)
 
@@ -171,5 +171,8 @@ class IkiWikiProcedureProxy(object):
                     return
                 time.sleep(LOOP_DELAY)
         except Exception, e:
-            self._debug_fn('uncaught exception: %s' % e)
+            print >>sys.stderr, 'uncaught exception: %s' % e
+            import traceback
+            print >>sys.stderr, traceback.format_exc(sys.exc_info()[2])
+            import posix
             sys.exit(posix.EX_SOFTWARE)