From 4948e71289dbf3bb84a5d38e9c8f8336d0fb3559 Mon Sep 17 00:00:00 2001
From: Virgile Prevosto <virgile.prevosto@m4x.org>
Date: Wed, 19 Apr 2023 10:37:59 +0200
Subject: [PATCH] [machdep] fix pyflakes warnings on make_machdep

---
 share/machdeps/make_machdep/make_machdep.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/share/machdeps/make_machdep/make_machdep.py b/share/machdeps/make_machdep/make_machdep.py
index 6eb4fa52bb1..5382fcfd39e 100755
--- a/share/machdeps/make_machdep/make_machdep.py
+++ b/share/machdeps/make_machdep/make_machdep.py
@@ -40,7 +40,6 @@ by hand afterwards.
 
 import argparse
 import yaml
-import json
 from pathlib import Path
 import re
 import subprocess
@@ -121,9 +120,6 @@ def check_machdep(machdep):
     except ImportError:
         warnings.warn("jsonschema is not available: no validation will be performed")
         return True
-    except OSError:
-        warnings.warn(f"error opening {schema_filename}: no validation will be performed")
-        return True
     except ValidationError:
         warnings.warn("machdep object is not conforming to machdep schema")
         return False
@@ -392,7 +388,7 @@ if proc.returncode == 0:
         lines += f"{line.strip()}\n"
     machdep["custom_defs"] = custom_defs(lines)
 else:
-    warnings.warn(f"could not determine predefined macros")
+    warnings.warn("could not determine predefined macros")
     if args.verbose:
         print(f"compiler output is:{proc.stderr}")
 
-- 
GitLab