From: W. Trevor King Date: Fri, 16 Jul 2010 05:17:14 +0000 (-0400) Subject: Raise a more helpful error message is a directory does not exist X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7a6e598f872ad00a6dbde04616a972cdf4d788e3;p=dirtag.git Raise a more helpful error message is a directory does not exist --- 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(