]> git.plutz.net Git - tabnote/commitdiff
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 2d0c30544a488e6b9759d530355ecdab9029aa80..a55728393665e22ce30a7483dba9a9acb7495f72 100644 (file)
--- a/tabserver
+++ b/tabserver
@@ -2,20 +2,10 @@
 #encoding: utf-8
 
 import pysqlite2.dbapi2 as dbapi
 #encoding: utf-8
 
 import pysqlite2.dbapi2 as dbapi
-import SimpleXMLRPCServer.CGIXMLRPCRequestHandler as rpcHandler
+import SimpleXMLRPCServer
 
 sql = None
 
 
 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()
 
 def initDB():
   sql = dbapi.connect('noteDB.sqlite').cursor()
 
@@ -26,7 +16,7 @@ def initDB():
                'content TEXT, revision DATETIME, UNIQE (uuid));')
   except: pass
 
                'content TEXT, revision DATETIME, UNIQE (uuid));')
   except: pass
 
-def closeDB()
+def closeDB():
   db = sql.connection
   sql.close()
   db.commit()
   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 + '";')
 
   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()