diff options
author | Stef Walter <stef@memberwebs.com> | 2006-04-06 18:31:57 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2006-04-06 18:31:57 +0000 |
commit | 2fcfb1f6edea8c3011d1fba1b43b43474138af29 (patch) | |
tree | 934723f7842973103ce66a6605cf4964c47fb6c8 /tools/rrdui-cgi.py | |
parent | 0e3d1b9a99a0935fadca2153c094acb0ab992c14 (diff) |
Fix error when no path specified
Diffstat (limited to 'tools/rrdui-cgi.py')
-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] |