fixed some typos and type errors master
authorpaul <paul@plutz.net>
Wed, 12 Jan 2011 23:32:05 +0000 (23:32 +0000)
committerpaul <paul@plutz.net>
Wed, 12 Jan 2011 23:32:05 +0000 (23:32 +0000)
svn path=/trunk/; revision=8

tabserver

index 2d0c305..a557283 100644 (file)
--- a/tabserver
+++ b/tabserver
@@ -2,20 +2,10 @@
 #encoding: utf-8
 
 import pysqlite2.dbapi2 as dbapi
-import SimpleXMLRPCServer.CGIXMLRPCRequestHandler as rpcHandler
+import SimpleXMLRPCServer
 
 sql = None
 
-rpc = rpcHandler()
-rpc.register_function(quickIndex)
-rpc.register_function(setRecord)
-rpc.register_function(getRecord)
-rpc.register_function(delRecord)
-initDB()
-rpc.handle_request()
-closeDB()
-
-
 def initDB():
   sql = dbapi.connect('noteDB.sqlite').cursor()
 
@@ -26,7 +16,7 @@ def initDB():
                'content TEXT, revision DATETIME, UNIQE (uuid));')
   except: pass
 
-def closeDB()
+def closeDB():
   db = sql.connection
   sql.close()
   db.commit()
@@ -67,11 +57,11 @@ def getRecord(uuid):
   uuid = escape(uuid)
   sql.execute('SELECT uuid, seq, label, content, revision FROM notes WHERE uuid = "' + uuid + '";')
 
-
-
-
-
-
-
-
-
+rpc = SimpleXMLRPCServer.CGIXMLRPCRequestHandler()
+rpc.register_function(quickIndex)
+rpc.register_function(setRecord)
+rpc.register_function(getRecord)
+rpc.register_function(delRecord)
+initDB()
+rpc.handle_request()
+closeDB()