Remove unused lines

This commit is contained in:
flan 2017-10-28 18:14:05 +02:00
parent 4a9ee4d40c
commit 48cfa9a029
4 changed files with 1 additions and 25 deletions

View File

@ -1,15 +1,2 @@
import sys
sys.path.insert(0, "/usr/share/anki")
#def server_runner(app, global_conf, **kw):
# """ Special version of paste.httpserver.server_runner which calls
# AnkiServer.thread.shutdown() on server exit."""
#
# from paste.httpserver import server_runner as paste_server_runner
# from AnkiServer.thread import shutdown
# try:
# paste_server_runner(app, global_conf, **kw)
# finally:
# shutdown()
#

View File

@ -1,11 +1,8 @@
import anki
import anki.storage
import os, errno
__all__ = ['CollectionWrapper', 'CollectionManager']
class CollectionWrapper(object):
"""A simple wrapper around an anki.storage.Collection object.

View File

@ -730,12 +730,7 @@ class SqliteUserManager(SimpleUserManager):
return (db_ret != None and hashobj.hexdigest()+salt == db_hash)
# Our entry point
def make_app(global_conf, **local_conf):
if local_conf.has_key('session_db_path'):
local_conf['session_manager'] = SqliteSessionManager(local_conf['session_db_path'])
if local_conf.has_key('auth_db_path'):
local_conf['user_manager'] = SqliteUserManager(local_conf['auth_db_path'])
return SyncApp(**local_conf)
def main():
@ -752,7 +747,7 @@ def main():
print "Starting..."
httpd.serve_forever()
except KeyboardInterrupt:
print "Exiting ..."
print "Exiting..."
finally:
shutdown()

View File

@ -1,4 +1,3 @@
from __future__ import absolute_import
from ankisyncd.collection import CollectionWrapper, CollectionManager
@ -8,8 +7,6 @@ from Queue import Queue
import time, logging
__all__ = ['ThreadingCollectionWrapper', 'ThreadingCollectionManager']
class ThreadingCollectionWrapper(object):
"""Provides the same interface as CollectionWrapper, but it creates a new Thread to
interact with the collection."""