From 06ae744c1f63bb3388808be9e5696450ead8fee8 Mon Sep 17 00:00:00 2001 From: jamesbunton Date: Tue, 1 Nov 2005 00:56:53 +0000 Subject: [PATCH] Make PyMSNt.tac pay attention to CONFIG git-svn-id: http://delx.cjb.net/svn/pymsnt/trunk@10 55fbd22a-6204-0410-b2f0-b6c764c7e90a committer: jamesbunton --- PyMSNt.tac | 2 ++ src/config.py | 2 ++ src/xmlconfig.py | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/PyMSNt.tac b/PyMSNt.tac index e41586a..c0381da 100644 --- a/PyMSNt.tac +++ b/PyMSNt.tac @@ -17,6 +17,8 @@ sys.path[0] = os.path.abspath(PATH + "/src/") os.chdir(PATH) # Set up the service +import config +config.configFile = CONFIG import main from twisted.application import service application = service.Application("PyMSNt") diff --git a/src/config.py b/src/config.py index 6ab37fe..655eb10 100644 --- a/src/config.py +++ b/src/config.py @@ -1,6 +1,8 @@ # This file contains the default settings for various options. # Please edit config.xml instead of this file +configFile = "config.xml" + jid = "msn" ip = "127.0.0.1" compjid = "" diff --git a/src/xmlconfig.py b/src/xmlconfig.py index e461d7e..5b01310 100644 --- a/src/xmlconfig.py +++ b/src/xmlconfig.py @@ -18,7 +18,7 @@ def invalidError(text): def reloadConfig(): # Find out where the config file is - configFile = "config.xml" + configFile = config.configFile if len(sys.argv) == 2: configFile = sys.argv[1] -- 2.39.2