Changeset 190


Ignore:
Timestamp:
09/13/07 11:45:56 (14 years ago)
Author:
bas
Message:

email2trac.py.in:

  • Applied patch to check if syslog is available
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r189 r190  
    44          Reported By: Marc Zahnlecker m.zahnlecker at lxbyte dot de
    55          Fixed By   : Bas van der Vlies
     6
     7        * Added check if syslog module is available. If it is not available
     8          disable the syslog functionality.
     9          Author     : michael.th add gmx dot net
     10         
    611
    7122007-07-18
  • trunk/email2trac.py.in

    r189 r190  
    8989from stat import *
    9090import mimetypes
    91 import syslog
    9291import traceback
     92
     93
     94# Will fail where unavailable, e.g. Windows
     95#
     96try:
     97    import syslog
     98    SYSLOG_AVAILABLE = True
     99except ImportError:
     100    SYSLOG_AVAILABLE = False
    93101
    94102from datetime import tzinfo, timedelta, datetime
     
    10681076                       
    10691077                if settings.has_key('enable_syslog'):
    1070                         ENABLE_SYSLOG =  float(settings['enable_syslog'])
     1078                        if SYSLOG_AVAILABLE:
     1079                                ENABLE_SYSLOG =  float(settings['enable_syslog'])
    10711080
    10721081                env = Environment(settings['project'], create=0)
Note: See TracChangeset for help on using the changeset viewer.