Skip to content

Commit

Permalink
Make python module also protocol independent.
Browse files Browse the repository at this point in the history
  • Loading branch information
manugarg committed Oct 10, 2008
1 parent 1b476b8 commit 9135a26
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pymod/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import os
import re

url_regex = re.compile('(http[s]?|ftp)\:\/\/([^\/]+).*')
url_regex = re.compile('.*\:\/\/([^\/]+).*')

def init():
"""
Expand All @@ -56,8 +56,8 @@ def find_proxy(url, host=None):
if not m:
print 'URL: %s is not a valid URL' % url
return None
if len(m.groups()) is 2:
host = m.groups()[1]
if len(m.groups()) is 1:
host = m.groups()[0]
else:
print 'URL: %s is not a valid URL' % url
return None
Expand Down Expand Up @@ -85,8 +85,8 @@ def just_find_proxy(pacfile, url, host=None):
if not m:
print 'URL: %s is not a valid URL' % url
return None
if len(m.groups()) is 2:
host = m.groups()[1]
if len(m.groups()) is 1:
host = m.groups()[0]
else:
print 'URL: %s is not a valid URL' % url
return None
Expand Down

0 comments on commit 9135a26

Please sign in to comment.