linuxmint / warpinator

Share files across the LAN
GNU General Public License v3.0
1.17k stars 80 forks source link

1.4.0: NameError: name 'self' is not defined #147

Closed bobby285271 closed 1 year ago

bobby285271 commented 1 year ago

Got this when trying to launch 1.4.0 (and it does not launch):

Traceback (most recent call last):
  File "/nix/store/4w2kb912szb6pflp2p5filvhq67fbcjy-warpinator-1.4.0/bin/.warpinator-wrapped", line 12, in <module>
    import prefs
  File "/nix/store/4w2kb912szb6pflp2p5filvhq67fbcjy-warpinator-1.4.0/libexec/warpinator/prefs.py", line 97, in <module>
    secure_mode_blocker.enforce_secure_mode()
  File "/nix/store/4w2kb912szb6pflp2p5filvhq67fbcjy-warpinator-1.4.0/libexec/warpinator/prefs.py", line 94, in enforce_secure_mode
    self.set_active(not auth.get_secure_mode())
  File "/nix/store/4w2kb912szb6pflp2p5filvhq67fbcjy-warpinator-1.4.0/libexec/warpinator/auth.py", line 121, in get_secure_mode
    return get_group_code() != DEFAULT_GROUP_CODE
  File "/nix/store/4w2kb912szb6pflp2p5filvhq67fbcjy-warpinator-1.4.0/libexec/warpinator/auth.py", line 111, in get_group_code
    self.code = DEFAULT_GROUP_CODE
NameError: name 'self' is not defined

Git blame says it is introduced in https://github.com/linuxmint/warpinator/commit/9f17136d4490b0089bb82a7f71f51acd0e9fff8b, 1.2.15 launches fine for me.

https://github.com/linuxmint/warpinator/blob/ce1240eeeec002419358f7f63fdccc4bc7ea3c99/src/auth.py#L97-L118