Fixing a issue that arose with adding of logging, we tried to use ~/.dialcentral...
authorepage <eopage@byu.net>
Tue, 15 Sep 2009 03:07:25 +0000 (03:07 +0000)
committerepage <eopage@byu.net>
Tue, 15 Sep 2009 03:07:25 +0000 (03:07 +0000)
git-svn-id: file:///svnroot/gc-dialer/trunk@440 c39d3808-3fe2-4d86-a59f-b7f623ee9f21

src/dialcentral.py

index ab30c07..4f669ff 100755 (executable)
@@ -1,5 +1,6 @@
 #!/usr/bin/python
 
+import os
 import sys
 import logging
 
@@ -11,9 +12,16 @@ import constants
 import dc_glade
 
 
+try:
+       os.makedirs(constants._data_path_)
+except OSError, e:
+       if e.errno != 17:
+               raise
+
 userLogPath = "%s/dialcentral.log" % constants._data_path_
 logging.basicConfig(level=logging.DEBUG, filename=userLogPath)
 logging.info("Dialcentral %s-%s" % (constants.__version__, constants.__build__))
+
 try:
        dc_glade.run_dialpad()
 finally: