YunoHost / package_check

Shell script which check package actions: install, remove, upgrade, backup, restore…
GNU General Public License v3.0
21 stars 26 forks source link

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

Closed anto1ne closed 4 years ago

anto1ne commented 4 years ago

Hi,

I try to use package_check but I have now an error (same script than few month ago, no modification, working well 24 days ago https://ci-apps.yunohost.org/ci/apps/pluxml/)

when I run

git clone git@github.com:YunoHost-Apps/pluxml_ynh.git
package_check/package_check.sh pluxml_ynh/

I have this result

>> Package linter... [Test 1/11]
Traceback (most recent call last):
  File "/home/admin/package_check/package_linter/package_linter.py", line 643, in <module>
    main()
  File "/home/admin/package_check/package_linter/package_linter.py", line 637, in main
    App(app_path).analyze()
  File "/home/admin/package_check/package_linter/package_linter.py", line 107, in analyze
    self.check_manifest()
  File "/home/admin/package_check/package_linter/package_linter.py", line 318, in check_manifest
    elif code_license not in urlopen(link)['content']:
  File "/home/admin/package_check/package_linter/package_linter.py", line 81, in urlopen
    return {'content': conn.read().decode('UTF8'), 'code': 200}
UnboundLocalError: local variable 'conn' referenced before assignment
anto1ne commented 4 years ago

hmm, I reboot my VM and now it is working I do not understand ...

alexAubin commented 4 years ago

This is a package_linter issue and was fixed here https://github.com/YunoHost/package_linter/commit/462cf09587e75e8502dfd0e149d1e19d79626a16

(Most likely caused by some temporary network issue which is why you were not able to reproduce the issue)