# HG changeset patch # User Aurelien Campeas # Date 1271851698 -7200 # Node ID ca838c79af97756352331ba6d2e62a2c9aa47a1d # Parent e185d708a36fedf947b8f8d6343e1297601f8156 [service] do not bluntly override these things if they exist diff -r e185d708a36f -r ca838c79af97 etwist/service.py --- a/etwist/service.py Tue Apr 20 18:32:42 2010 +0200 +++ b/etwist/service.py Wed Apr 21 14:08:18 2010 +0200 @@ -14,8 +14,10 @@ logger = getLogger('cubicweb.twisted') logger.handlers = [handlers.NTEventLogHandler('cubicweb')] -os.environ['CW_INSTANCES_DIR'] = r'C:\etc\cubicweb.d' -os.environ['USERNAME'] = 'cubicweb' +if not os.environ.get('CW_INSTANCES_DIR'): + os.environ['CW_INSTANCES_DIR'] = r'C:\etc\cubicweb.d' +if not os.environ.get('USERNAME'): + os.environ['USERNAME'] = 'cubicweb' class CWService(object, win32serviceutil.ServiceFramework): _svc_name_ = None