1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 21:29:43 +00:00

fix pylint C0103

This commit is contained in:
deadc0de6
2023-08-06 21:39:14 +02:00
parent 070b333030
commit dfb2641813
2 changed files with 18 additions and 10 deletions

View File

@@ -123,21 +123,26 @@ def check_links(urls):
return True
# pylint: disable=C0103
if __name__ == '__main__':
def main():
"""entry point"""
if len(sys.argv) < 2:
print(f'usage: {sys.argv[0]} <path>')
sys.exit(1)
return False
print(f'checking {BLUE}{sys.argv[1]}{RESET} for links...')
links = get_links(sys.argv[1])
print(f' found {len(links)} links')
try:
if not check_links(links):
sys.exit(1)
return False
# pylint: disable=W0703
except Exception as exc:
print(f'error {exc}')
sys.exit(1)
sys.exit(0)
# pylint: enable=C0103
return False
return True
if __name__ == '__main__':
if main():
sys.exit(0)
sys.exit(1)