summaryrefslogtreecommitdiffstats
path: root/pyload/config/Parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/config/Parser.py')
-rw-r--r--pyload/config/Parser.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pyload/config/Parser.py b/pyload/config/Parser.py
index f834e4b4e..6e060ec9e 100644
--- a/pyload/config/Parser.py
+++ b/pyload/config/Parser.py
@@ -7,7 +7,7 @@ import shutil
import time
import traceback
-from pyload.utils import chmod, encode, decode
+from pyload.utils import encode, decode
CONF_VERSION = 1
@@ -205,7 +205,11 @@ class ConfigParser(object):
def saveConfig(self, config, filename):
"""saves config to filename"""
with open(filename, "wb") as f:
- os.chmod(filename, 0600)
+ try:
+ os.chmod(filename, 0600)
+ except Exception:
+ pass
+
f.write("version: %i \n" % CONF_VERSION)
for section in config.iterkeys():
f.write('\n%s - "%s":\n' % (section, config[section]['desc']))