Permalink
Browse files

Fixed minor bugs in dvdrip.py

- added coding header. Oops.
- produce better error message when device is asked for but has nothing
  mounted on it.
  • Loading branch information...
1 parent 1d61170 commit 8af1a04d99ed2539c928febaca72cc1e63495884 @xenomachina committed Apr 5, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 media/dvdrip/dvdrip.py
View
@@ -1,4 +1,5 @@
#!/usr/bin/env python2.7
+# coding=utf-8
import argparse
import errno
@@ -271,8 +272,9 @@ def main():
output = args.output
if args.input_device:
- input = FindMountPoint(input)
-
+ found = FindMountPoint(input)
+ assert found is not None, 'Nothing mounted on %r' % input
+ input = found
assert os.path.exists(input), '%r not found' % input
assert os.path.isdir(input), '%r is not a directory' % input
print 'Reading from %r' % input

0 comments on commit 8af1a04

Please sign in to comment.