From 2fcfb1f6edea8c3011d1fba1b43b43474138af29 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 6 Apr 2006 18:31:57 +0000 Subject: Fix error when no path specified --- tools/rrdui-cgi.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/rrdui-cgi.py b/tools/rrdui-cgi.py index 1584555..282d428 100755 --- a/tools/rrdui-cgi.py +++ b/tools/rrdui-cgi.py @@ -162,10 +162,11 @@ def displayGraph(): rrdtool.graph(*args) -if not os.environ.has_key("PATH_INFO"): - raise "PATH_INFO not set" +if os.environ.has_key("PATH_INFO"): + path = os.environ["PATH_INFO"].strip("/") +else: + path = "" -path = os.environ["PATH_INFO"].strip("/") parts = path.split("/") method = parts[0] -- cgit v1.2.3