|
726 |
except IOError, e: |
726 |
except IOError, e: |
727 |
return self.COMPONENT_UNKNOWN |
727 |
return self.COMPONENT_UNKNOWN |
728 |
rePath = re.compile('(un)?maintained/component/ ?%s/' % name) |
728 |
rePath = re.compile('(un)?maintained/component/ ?%s/' % name) |
|
|
729 |
reDenied = re.compile('credentials not accepted: %s$' % name) |
729 |
try: |
730 |
try: |
730 |
for line in comp_file: |
731 |
for line in comp_file: |
731 |
if line.startswith('deb ') and rePath.search(line): |
732 |
if line.startswith('deb ') and rePath.search(line): |
732 |
# stop immediately if at least one repo has been found |
733 |
# stop immediately if at least one repo has been found |
733 |
return self.COMPONENT_AVAILABLE |
734 |
return self.COMPONENT_AVAILABLE |
734 |
elif 'credentials not accepted' in line: |
735 |
elif reDenied.search(line): |
735 |
# stop immediately if at least one repo has authentication problems |
736 |
# stop immediately if at least one repo has authentication problems |
736 |
return self.COMPONENT_PERMISSION_DENIED |
737 |
return self.COMPONENT_PERMISSION_DENIED |
737 |
# file contains no valid repo entry |
738 |
# file contains no valid repo entry |