summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/sunlink.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Tool/sunlink.py')
-rw-r--r--src/engine/SCons/Tool/sunlink.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/engine/SCons/Tool/sunlink.py b/src/engine/SCons/Tool/sunlink.py
index 66dd7c0..665d656 100644
--- a/src/engine/SCons/Tool/sunlink.py
+++ b/src/engine/SCons/Tool/sunlink.py
@@ -45,7 +45,9 @@ ccLinker = None
try:
dirs = os.listdir('/opt')
-except OSError:
+except (IOError, OSError):
+ # Not being able to read the directory because it doesn't exist
+ # (IOError) or isn't readable (OSError) is okay.
dirs = []
for d in dirs: