Skip to content
Permalink
Browse files

update-distcc-symlinks: catch some errors

  • Loading branch information...
shawnl committed Aug 6, 2018
1 parent d80562b commit b71ae75f7cb99e8f4d8f2281abb860c5eb6aed97
Showing with 20 additions and 11 deletions.
  1. +20 −11 update-distcc-symlinks.py
@@ -31,17 +31,26 @@ def consider_clang(suffix):
consider_gcc("", "")
consider_gcc("c89-", "")
consider_gcc("c99-", "")
for gnu_host in os.listdir(gcc_dir):
consider_gcc("%(gnu_host)s-" % vars(), "")
for version in os.listdir(gcc_dir + "/" + gnu_host):
consider_gcc("", "-%(version)s" % vars())
consider_gcc("%(gnu_host)s-" % vars(), "-%(version)s" % vars())
for gnu_host in os.listdir(gcccross_dir):
consider_gcc("%(gnu_host)s-" % vars(), "")
for version in os.listdir(gcccross_dir + "/" + gnu_host):
consider_gcc("", "-%(version)s" % vars())
consider_gcc("%(gnu_host)s-" % vars(), "-%(version)s" % vars())

try:
for gnu_host in os.listdir(gcc_dir):
consider_gcc("%(gnu_host)s-" % vars(), "")
for version in os.listdir(gcc_dir + "/" + gnu_host):
consider_gcc("", "-%(version)s" % vars())
consider_gcc("%(gnu_host)s-" % vars(), "-%(version)s" % vars())
except FileNotFoundError:
pass
except NotADirectoryError:
pass
try:
for gnu_host in os.listdir(gcccross_dir):
consider_gcc("%(gnu_host)s-" % vars(), "")
for version in os.listdir(gcccross_dir + "/" + gnu_host):
consider_gcc("", "-%(version)s" % vars())
consider_gcc("%(gnu_host)s-" % vars(), "-%(version)s" % vars())
except FileNotFoundError:
pass
except NotADirectoryError:
pass

consider_clang("")
for ent in os.listdir("/usr/lib"):

0 comments on commit b71ae75

Please sign in to comment.
You can’t perform that action at this time.