Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
amrani
erp5
Commits
1106f02e
Commit
1106f02e
authored
Jan 31, 2012
by
Tatuya Kamada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the problem that web checking result can be duplicated.
parent
b0e585b9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
erp5/util/webchecker/__init__.py
erp5/util/webchecker/__init__.py
+21
-0
No files found.
erp5/util/webchecker/__init__.py
View file @
1106f02e
...
@@ -363,6 +363,25 @@ class HTTPCacheCheckerTestSuite(object):
...
@@ -363,6 +363,25 @@ class HTTPCacheCheckerTestSuite(object):
(header, read_value, reference_value)
(header, read_value, reference_value)
self.report_dict.setdefault(url, []).append(message)
self.report_dict.setdefault(url, []).append(message)
def _isSameUrl(self, url):
"""
Return whether the url is already checked or not.
Example case):
http://example.com/login_form
http://example.com/login_form/
"""
if url in (None, ''):
return False
same_url = None
if url.endswith('/'):
same_url = url.rstrip('/')
else:
same_url = '%s/' % url
if same_url in self.report_dict:
return True
return False
def _parseWgetLogs(self, wget_log_file, discarded_url_list=_MARKER,
def _parseWgetLogs(self, wget_log_file, discarded_url_list=_MARKER,
prohibited_file_name_list=None,
prohibited_file_name_list=None,
prohibited_folder_name_list=None):
prohibited_folder_name_list=None):
...
@@ -386,6 +405,8 @@ class HTTPCacheCheckerTestSuite(object):
...
@@ -386,6 +405,8 @@ class HTTPCacheCheckerTestSuite(object):
# URL already checked during first pass
# URL already checked during first pass
logging.debug('%r Discarded' % url)
logging.debug('%r Discarded' % url)
discarded = True
discarded = True
elif self._isSameUrl(url):
discarded = True
if discarded:
if discarded:
# keep reading wget process without doing anything
# keep reading wget process without doing anything
continue
continue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment