]> git.llucax.com Git - software/blitiri.git/commitdiff
Be more verbose with article path errors.
authorAlberto Bertogli <albertito@gmail.com>
Tue, 22 May 2007 05:28:52 +0000 (02:28 -0300)
committerAlberto Bertogli <albertito@gmail.com>
Tue, 22 May 2007 05:28:52 +0000 (02:28 -0300)
It's easier to debug problems if we echo the full paths when dying because
the article is not inside the data path.

Signed-off-by: Alberto Bertogli <albertito@gmail.com>
blitiri.cgi

index a72ccdd19968cfabe83fda06f74acb2049d0dfc5..c43835d2710b81d86631724efc9e7a06bb5c43ff 100755 (executable)
@@ -627,7 +627,8 @@ def handle_cmd():
        art_path = os.path.realpath(sys.argv[2])
 
        if os.path.commonprefix([data_path, art_path]) != data_path:
        art_path = os.path.realpath(sys.argv[2])
 
        if os.path.commonprefix([data_path, art_path]) != data_path:
-               print "Error: article must be inside data dir"
+               print "Error: article (%s) must be inside data_path (%s)" % \
+                               (art_path, data_path)
                return 1
        art_path = art_path[len(data_path):]
 
                return 1
        art_path = art_path[len(data_path):]