summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/configHandler.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/idlelib/configHandler.py')
-rw-r--r--Lib/idlelib/configHandler.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py
index 5bf2668..ea2010e 100644
--- a/Lib/idlelib/configHandler.py
+++ b/Lib/idlelib/configHandler.py
@@ -142,7 +142,7 @@ class IdleUserConfParser(IdleConfParser):
fname = self.file
try:
cfgFile = open(fname, 'w')
- except IOError:
+ except OSError:
os.unlink(fname)
cfgFile = open(fname, 'w')
with cfgFile:
@@ -207,7 +207,7 @@ class IdleConf:
userDir+',\n but the path does not exist.\n')
try:
sys.stderr.write(warn)
- except IOError:
+ except OSError:
pass
userDir = '~'
if userDir == "~": # still no path to home!
@@ -217,7 +217,7 @@ class IdleConf:
if not os.path.exists(userDir):
try:
os.mkdir(userDir)
- except (OSError, IOError):
+ except OSError:
warn = ('\n Warning: unable to create user config directory\n'+
userDir+'\n Check path and permissions.\n Exiting!\n\n')
sys.stderr.write(warn)
@@ -251,7 +251,7 @@ class IdleConf:
raw=raw)))
try:
sys.stderr.write(warning)
- except IOError:
+ except OSError:
pass
try:
if self.defaultCfg[configType].has_option(section,option):
@@ -268,7 +268,7 @@ class IdleConf:
(option, section, default))
try:
sys.stderr.write(warning)
- except IOError:
+ except OSError:
pass
return default
@@ -380,7 +380,7 @@ class IdleConf:
(element, themeName, theme[element]))
try:
sys.stderr.write(warning)
- except IOError:
+ except OSError:
pass
colour=cfgParser.Get(themeName,element,default=theme[element])
theme[element]=colour
@@ -637,7 +637,7 @@ class IdleConf:
(event, keySetName, keyBindings[event]))
try:
sys.stderr.write(warning)
- except IOError:
+ except OSError:
pass
return keyBindings