lists.arthurdejong.org
RSS feed

Re: webcheck: IndexError: string index out of range

[Date Prev][Date Next] [Thread Prev][Thread Next]

Re: webcheck: IndexError: string index out of range



On Thu, 2010-09-23 at 12:16 -0500, Juan Luis wrote:
> not been able to workaround a rogue string. I tried adding y= to
> blacklist it but perhaps I am not doing it right.
> 
> ./webcheck.py -u http:/sitename.com -c --ignore-robots -y=https:///
> 
> the string that seems to throw the error is 'https:///'
> 
> webcheck:   https:///
> Traceback (most recent call last):
[...]
>  File "/webcheck/schemes/http.py", line 58, in fetch
>    if netloc[0] == '.':
> IndexError: string index out of range
> 
> any ideas on how i can fix?

Attached is a patch that should fix it.

A workaround would be to add the following option:
  --yank '^https:///$'

The problem with your -y option was that in that syntax the = was
considered part of the regexp.

Hope this helps. Thanks for pointing this out.

-- 
-- arthur - arthur@arthurdejong.org - http://arthurdejong.org --

Attachment: webcheck-fix-empty-hostname.patch
Description: Text Data

--
To unsubscribe send an email to
webcheck-users-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/webcheck-users