Changeset 9212:9e12e7b6ed31 in orange


Ignore:
Timestamp:
11/16/11 10:37:41 (2 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
f794cf4427c046c550d13e2d8a11b1b506a8eae8
Message:

Do not add a log file handler if no write permissions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeCanvas/orngSignalManager.py

    r8042 r9212  
    131131            SignalManager.log = logging.getLogger("SignalManager") 
    132132            self.logFileName = os.path.join(orngEnviron.canvasSettingsDir, "signalManager.log") 
    133             self.log.addHandler(logging.handlers.RotatingFileHandler(self.logFileName, maxBytes=2**20, backupCount=2)) 
     133            try: 
     134                self.log.addHandler(logging.handlers.RotatingFileHandler(self.logFileName, maxBytes=2**20, backupCount=2)) 
     135            except: 
     136                pass 
    134137            self.log.setLevel(logging.INFO) 
    135              
    136138             
    137139        self.log.info("Signal Manager started") 
Note: See TracChangeset for help on using the changeset viewer.