# Path: pyas2/pyas2init.py
# def initialize():
# def initserverlogging(logname):


from django.core.management.base import BaseCommand
from django.core.handlers.wsgi import WSGIHandler
from django.utils.translation import ugettext as _
from pyas2 import pyas2init
            from cherrypy import wsgiserver
import pyas2
import os
            import cherrypy


class Command(BaseCommand):
    help = _(u'Starts the PyAS2 server')

    def handle(self, *args, **options):
        try:
        except Exception:
            raise ImportError(_(u'Dependency failure: cherrypy library is needed to start the as2 server'))

        cherrypy.config.update({
            'global': {
                'log.screen': False,

# Path: pyas2/pyas2init.py
# def initialize():
# def initserverlogging(logname):


# Path: pyas2/management/commands/runas2server.py
from django.core.management.base import BaseCommand
from django.core.handlers.wsgi import WSGIHandler
from django.utils.translation import ugettext as _
from pyas2 import pyas2init
            from cherrypy import wsgiserver
import pyas2
import os
            import cherrypy



class Command(BaseCommand):
    help = _(u'Starts the PyAS2 server')

    def handle(self, *args, **options):
        try:
        except Exception:
            raise ImportError(_(u'Dependency failure: cherrypy library is needed to start the as2 server'))

        cherrypy.config.update({
            'global': {
                'log.screen': False,

                'log.error_file': os.path.join(pyas2init.gsettings['log_dir'], 'cherrypy_error.log'),