1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
From 0fd55825656111ecd24ad07341b607098e253003 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Wed, 10 Jul 2013 08:03:07 -0400
Subject: Work around Debian bug 712596, fixes #4
Patch-Name: 0001-Work-around-Debian-bug-712596-fixes-4.patch
---
tagpy/__init__.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tagpy/__init__.py b/tagpy/__init__.py
index 2f3da23..2e3bfd6 100644
--- a/tagpy/__init__.py
+++ b/tagpy/__init__.py
@@ -101,6 +101,10 @@ class FileRef(object):
if file:
return file
+ from os.path import exists
+ if not exists(fileName):
+ raise IOError("File does not exist")
+
from os.path import splitext
ext = splitext(fileName)[1][1:].lower()
|