[jhbuild] sys'install: Catch right exception from subprocess
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] sys'install: Catch right exception from subprocess
- Date: Mon, 5 Dec 2016 21:39:16 +0000 (UTC)
commit f652e974629720c4c4a2ac2bfeb01ebf1414d51e
Author: Daniel Boles <dboles src gnome org>
Date: Mon Dec 5 21:30:08 2016 +0000
sys'install: Catch right exception from subprocess
Credit to mcatanzaro!
https://bugzilla.gnome.org/show_bug.cgi?id=775668
jhbuild/utils/systeminstall.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/jhbuild/utils/systeminstall.py b/jhbuild/utils/systeminstall.py
index 10e18d6..8bd0124 100644
--- a/jhbuild/utils/systeminstall.py
+++ b/jhbuild/utils/systeminstall.py
@@ -47,7 +47,7 @@ def get_installed_pkgconfigs(config):
versions = stdout.splitlines()
if len(versions) == len(pkgs):
return dict(zip(pkgs, versions))
- except OSError:
+ except subprocess.CalledProcessError:
pass
# We have to rather inefficiently repeatedly fork to work around
@@ -60,7 +60,7 @@ def get_installed_pkgconfigs(config):
stdout = proc.communicate()[0]
proc.wait()
pkgversions[pkg] = stdout.strip()
- except OSError: # pkg-config not installed
+ except subprocess.CalledProcessError: # pkg-config not installed
pass
return pkgversions
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]