From 7a6e598f872ad00a6dbde04616a972cdf4d788e3 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 16 Jul 2010 01:17:14 -0400 Subject: [PATCH] Raise a more helpful error message is a directory does not exist --- dirtag/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dirtag/__init__.py b/dirtag/__init__.py index b8f49c7..406c286 100644 --- a/dirtag/__init__.py +++ b/dirtag/__init__.py @@ -71,6 +71,8 @@ def dir_tree(root_dir): x|a2.dat x|b3.dat """ + if not os.path.exists(root_dir): + raise ValueError(root_dir) trees = {} for dirpath,dirnames,filenames in os.walk(root_dir, followlinks=True): t = trees.get( -- 2.26.2