Index: cms/sources.py |
=================================================================== |
--- a/cms/sources.py |
+++ b/cms/sources.py |
@@ -70,10 +70,13 @@ |
return locale, '/' + page |
def read_config(self): |
- configdata = self.read_file('settings.ini')[0] |
- config = ConfigParser.SafeConfigParser() |
- config.readfp(StringIO(configdata)) |
- return config |
+ try: |
+ configdata = self.read_file('settings.ini')[0] |
+ config = ConfigParser.SafeConfigParser() |
+ config.readfp(StringIO(configdata)) |
+ return config |
+ except IOError: |
+ return ConfigParser.SafeConfigParser() |
Vasily Kuznetsov
2019/01/04 18:46:03
This will do the trick, however, I'm worried that
rhowell
2019/01/08 00:19:25
Yeah, this seems clearer. Done.
|
def exec_file(self, filename): |
source, filename = self.read_file(filename) |