mirror of
https://github.com/munki/munki.git
synced 2026-01-05 22:20:00 -06:00
* Use PyObjC recommended pattern to call superclass init to fix #1183 * Use the pylint comments from gurl.
This commit is contained in:
@@ -35,6 +35,11 @@ import select
|
||||
import socket
|
||||
import sys
|
||||
|
||||
# builtin super doesn't work with Cocoa classes in recent PyObjC releases.
|
||||
# pylint: disable=redefined-builtin,no-name-in-module
|
||||
from objc import super
|
||||
# pylint: enable=redefined-builtin,no-name-in-module
|
||||
|
||||
try:
|
||||
# Apple frameworks
|
||||
from AppKit import NSWorkspace
|
||||
@@ -114,7 +119,7 @@ class NotificationHandler(NSObject):
|
||||
|
||||
def init(self):
|
||||
"""NSObject-compatible initializer"""
|
||||
self = super(NotificationHandler, self).init()
|
||||
self = super().init()
|
||||
if self is None:
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user