File jv_pr_8.patch of Package python-metaextract

From db99666e554370b8afd9613a4dfaf0559f59762c Mon Sep 17 00:00:00 2001
From: John Vandenberg <jayvdb@gmail.com>
Date: Tue, 26 Mar 2019 21:24:08 +0700
Subject: [PATCH] Recover from error in setup.py

---
 metaextract/utils.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/metaextract/utils.py b/metaextract/utils.py
index 038fdfe..a599e50 100644
--- a/metaextract/utils.py
+++ b/metaextract/utils.py
@@ -106,7 +106,10 @@ def _setup_py_run_from_dir(root_dir, py_interpreter):
         except subprocess.CalledProcessError:
             # try again with a encoding in setup.py
             _set_file_encoding_utf8("setup.py")
-            subprocess.check_output(cmd, shell=True)
+            try:
+                subprocess.check_output(cmd, shell=True)
+            except subprocess.CalledProcessError:
+                return data
 
         # read json file and return data
         with open(output_json.name, "r") as f:
openSUSE Build Service is sponsored by