File: package-version.py

package info (click to toggle)
libblkio 1.5.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,004 kB
  • sloc: ansic: 3,443; sh: 432; makefile: 34; python: 16
file content (9 lines) | stat: -rwxr-xr-x 206 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
#!/usr/bin/env python3
import json
import subprocess

try:
    out = subprocess.check_output(["cargo", "read-manifest"])
    print(json.loads(out)["version"])
except FileNotFoundError:
    print("unknown")