summaryrefslogtreecommitdiff
diff options
authorSylvain Pineau <sylvain.pineau@canonical.com>2020-07-14 12:13:47 +0200
committerSylvain Pineau <sylvain.pineau@canonical.com>2020-07-14 12:13:47 +0200
commitf0d9dc871a4a375c1646f2b0d7684df3870b8d51 (patch)
tree1e523670a1e8331e5c51413e8f786ae1f2b60c64
parent7fd50f209e22b290542c3f5b7dbcf7a49e9947dd (diff)
bin:optical_detect: Deleted
-rwxr-xr-xbin/optical_detect29
1 files changed, 0 insertions, 29 deletions
diff --git a/bin/optical_detect b/bin/optical_detect
deleted file mode 100755
index f1fe94b..0000000
--- a/bin/optical_detect
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env python3
-
-import os
-import re
-import sys
-
-
-def main(args):
- line_pattern = r"\s*(\d+)\s+dev='([^']+)'" \
- "\s+([wr-]{6})\s:\s'([^']+)'\s'([^']+)'"
- line_regex = re.compile(line_pattern)
-
- count = 0
- command = "wodim --devices"
- for line in os.popen(command).readlines():
- match = re.match(line_regex, line)
- if match:
- count += 1
- print(match.group(4), match.group(5))
-
- if not count:
- print("No optical devices detected.", file=sys.stderr)
- return 1
-
- return 0
-
-
-if __name__ == "__main__":
- sys.exit(main(sys.argv[1:]))