munki / munki

Managed software installation for macOS —

Home Page:https://www.munki.org/munki/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

app_usage_monitor fails trying to call superclass's init

sheagcraig opened this issue · comments

Running /usr/local/munki/app_usage_monitor

results in

Traceback (most recent call last):
  File "/usr/local/munki/app_usage_monitor", line 235, in <module>
    main()
  File "/usr/local/munki/app_usage_monitor", line 224, in main
    notification_handler = NotificationHandler.alloc().init()
  File "/usr/local/munki/app_usage_monitor", line 117, in init
    self = super().init()
AttributeError: 'super' object has no attribute 'init'
sys:1: UninitializedDeallocWarning: leaking an uninitialized object of type NotificationHandler

Fortunately this is easy to solve-I have a PR incoming.

The clue is from this PyObjC issue: ronaldoussoren/pyobjc#549
and newer PyObjC releases toss a warning if you do this.

Was this caused by the bump of PyObjC from 9.0.1 to 9.1.1? IOW, how long has this been broken?

Looks like this could have either been triggered by Munki 6.3.0 or 6.3.2, since both had changes in the PyObjC versions. I'm curious if this has been broken a couple of weeks or for several months...

Fixed by PR #1184