diff options
author | Arun Raghavan <ford_prefect@gentoo.org> | 2009-03-09 01:18:54 +0530 |
---|---|---|
committer | Arun Raghavan <ford_prefect@gentoo.org> | 2009-03-09 01:18:54 +0530 |
commit | 730e003b548ed9783f48da9bf91bfa144c1ba89a (patch) | |
tree | 7bcd051e4f2bc95ae679cb4eb7d7c8faab4a623b | |
parent | Add a timeout for http/ftp connections (diff) | |
download | gard-730e003b548ed9783f48da9bf91bfa144c1ba89a.tar.gz gard-730e003b548ed9783f48da9bf91bfa144c1ba89a.tar.bz2 gard-730e003b548ed9783f48da9bf91bfa144c1ba89a.zip |
Strip trailing '/'s from URLs
This was causing the addition of double slashes while concatenating
URLs. Curse you, Shyam Mani! :P
-rw-r--r-- | check.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -14,7 +14,9 @@ import urlparse class GardCheck: # Base class which provides some helper functions def __init__(self, url, log=True, timeout=30): - self.url = url + # Munge trailing '/' so we can sanely concatenate paths later + self.url = url.rstrip('/') + if log: self.logger = logging.getLogger('') else: |