Skip to content

Commit a9c40ff

Browse files
committed
Fix to run without PyYAML
1 parent a118cc6 commit a9c40ff

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

scripts/python_deps_check.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
1+
#!/usr/bin/python3
12
import sys
2-
import yaml
3-
import blessed
4-
import ruamel.yaml
53

64
if sys.argv[1] == "--pyyaml-version":
75
try:
6+
import yaml
87
print("pyyaml", yaml.__version__)
98
sys.exit(0)
109
except SystemExit:
1110
sys.exit(0)
12-
except:
11+
except Exception:
1312
print("could not get pyyaml version")
1413
sys.exit(3)
1514

1615
if sys.argv[1] == "--pyaml-version":
1716
try:
17+
import ruamel.yaml
1818
print("ruamel.yaml", ruamel.yaml.__version__)
1919
sys.exit(0)
2020
except SystemExit:
2121
sys.exit(0)
22-
except:
22+
except Exception:
2323
print("could not get ruamel.yaml version")
2424
sys.exit(3)
2525

2626
if sys.argv[1] == "--blessed-version":
2727
try:
28+
import blessed
2829
print("blessed", blessed.__version__)
2930
sys.exit(0)
3031
except SystemExit:
3132
sys.exit(0)
32-
except:
33+
except Exception:
3334
print("could not get blessed version")
3435
sys.exit(3)

0 commit comments

Comments
 (0)