diff options
-rwxr-xr-x | tools/rrdui-cgi.py | 7 |
1 files changed, 4 insertions, 3 deletions
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] |