From cba1878bb231afccf29f06d50ca0766ba6d607e8 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 15 Oct 2024 22:53:55 +0000 Subject: [PATCH] u2c: don't get stuck at fifos and such --- bin/u2c.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/u2c.py b/bin/u2c.py index 2ba35328..06867c5e 100755 --- a/bin/u2c.py +++ b/bin/u2c.py @@ -581,13 +581,17 @@ def walkdir(err, top, excl, seen): for ap, inf in sorted(statdir(err, top)): if excl.match(ap): continue - yield ap, inf if stat.S_ISDIR(inf.st_mode): + yield ap, inf try: for x in walkdir(err, ap, excl, seen): yield x except Exception as ex: err.append((ap, str(ex))) + elif stat.S_ISREG(inf.st_mode): + yield ap, inf + else: + err.append((ap, "irregular filetype 0%o" % (inf.st_mode,))) def walkdirs(err, tops, excl):