must explicitly catch ConfigParser.MissingSectionHeaderError
[sfa.git] / sfa / util / config.py
index 9caa767..7220afb 100644 (file)
@@ -47,12 +47,10 @@ DO NOT EDIT. This file was automatically generated at
         if filename:
             try:
                 self.config.read(filename)
-            except:
-                print "normal read failed" 
+            except ConfigParser.MissingSectionHeaderError:
                 if filename.endswith('.xml'):
                     self.load_xml(filename)
                 else:
-                    print "loading shell"
                     self.load_shell(filename)
             self._files.append(filename)
             self.set_attributes()