diff options
Diffstat (limited to 'lib/python/Components')
| -rwxr-xr-x | lib/python/Components/PluginComponent.py | 1 | ||||
| -rwxr-xr-x | lib/python/Components/config.py | 9 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/python/Components/PluginComponent.py b/lib/python/Components/PluginComponent.py index c6ad584f..b06246b2 100755 --- a/lib/python/Components/PluginComponent.py +++ b/lib/python/Components/PluginComponent.py @@ -49,7 +49,6 @@ class PluginComponent: directory_category = directory + c if not os_path.isdir(directory_category): continue - open(directory_category + "/__init__.py", "a").close() for pluginname in os_listdir(directory_category): path = directory_category + "/" + pluginname if os_path.isdir(path): diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index 6e560857..5507cae9 100755 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -1661,9 +1661,12 @@ class Config(ConfigSubsection): def saveToFile(self, filename): text = self.pickle() - f = open(filename, "w") - f.write(text) - f.close() + try: + f = open(filename, "w") + f.write(text) + f.close() + except IOError: + print "Config: Couldn't write %s" % filename def loadFromFile(self, filename, base_file=False): f = open(filename, "r") |
