MusikPolice/musik — pull request #2 by jbillo (2012-09-29 21:04:09+00:00)
Title: Add log directory creation to startup

When the repository has just been cloned, there is no 'logs' directory present, causing the application to fail:

Traceback (most recent call last):
File "musik.py", line 37, in
log = initLogging(__name__)
File "/home/jbillo/git/musik/musik/__init__.py", line 12, in initLogging
fs = logging.FileHandler(u'logs/%s.log' % moduleName)
File "/usr/lib/python2.7/logging/__init__.py", line 897, in __init__
StreamHandler.__init__(self, self._open())
File "/usr/lib/python2.7/logging/__init__.py", line 916, in _open
stream = open(self.baseFilename, self.mode)
IOError: [Errno 2] No such file or directory: u'/home/jbillo/git/musik/logs/__main__.log'

This pull request will attempt to create the directory on startup if it does not exist.