YunoHost / package_linter

Linter for YunoHost applications packages
https://yunohost.org/#/packaging_apps
GNU Affero General Public License v3.0
17 stars 13 forks source link

UnboundLocalError: local variable 'conn' referenced before assignment #84

Closed anto1ne closed 3 years ago

anto1ne commented 4 years ago

I have an issue when blogotext_ynh is checked with package_linter. https://ci-apps.yunohost.org/ci/job/1124

 Package linter... [Test 1/9]
Traceback (most recent call last):
  File "/home/CI_package_check/package_check/package_linter/package_linter.py", line 950, in <module>
    main()
  File "/home/CI_package_check/package_check/package_linter/package_linter.py", line 934, in main
    App(app_path).analyze()
  File "/home/CI_package_check/package_check/package_linter/package_linter.py", line 282, in analyze
    self.check_manifest()
  File "/home/CI_package_check/package_check/package_linter/package_linter.py", line 564, in check_manifest
    elif code_license not in spdx_licenses():
  File "/home/CI_package_check/package_check/package_linter/package_linter.py", line 260, in spdx_licenses
    content = urlopen(link)['content']
  File "/home/CI_package_check/package_check/package_linter/package_linter.py", line 247, in urlopen
    return {'content': conn.read().decode('UTF8'), 'code': 200}
UnboundLocalError: local variable 'conn' referenced before assignment
alexAubin commented 3 years ago

Fixed by https://github.com/YunoHost/package_linter/commit/462cf09587e75e8502dfd0e149d1e19d79626a16 a while ago