Version 0.2.6

This commit is contained in:
Rob Glew 2016-02-05 10:49:58 -06:00
parent 10f30bfb47
commit aa81432556
21 changed files with 304 additions and 96 deletions

View file

@ -6,6 +6,7 @@ import datetime
import os
import schema.update
import shutil
import signal
import sys
import tempfile
@ -16,6 +17,7 @@ from . import http
from . import plugin
from . import proxy
from . import requestcache
from . import util
from .console import ProxyCmd
from twisted.enterprise import adbapi
from twisted.internet import reactor, defer
@ -61,6 +63,10 @@ def delete_datafile():
print 'Deleting temporary datafile'
os.remove(config.DATAFILE)
def custom_int_handler(signum, frame):
# sorry
print "Sorry, we can't kill things partway through otherwise the data file might be left in a corrupt state"
@defer.inlineCallbacks
def main():
global server_factory
@ -68,6 +74,9 @@ def main():
global cons
settings = parse_args()
if not os.path.exists(config.DATA_DIR):
os.makedirs(config.DATA_DIR)
if settings['lite']:
conf_settings = config.get_default_config()
conf_settings['debug_dir'] = None