diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2008-10-11 13:31:48 +0400 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2008-10-11 13:31:48 +0400 |
commit | 6cc8204319b59da4a506f80f310ea5a013f34d65 (patch) | |
tree | 8dd4ea37dbc8a38f2324d00a4c2f26b783b4781e /src/osx/growl | |
parent | 9262133315acefcc7950014bf74583180283933e (diff) |
[thorstenp] replace if statement with dict.get()
Diffstat (limited to 'src/osx/growl')
-rw-r--r-- | src/osx/growl/Growl.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/osx/growl/Growl.py b/src/osx/growl/Growl.py index a5fa30381..09270f7e6 100644 --- a/src/osx/growl/Growl.py +++ b/src/osx/growl/Growl.py @@ -70,10 +70,7 @@ class netgrowl: self.socket.sendto(data, (self.hostname, GROWL_UDP_PORT)) def PostNotification(self, userInfo): - if GROWL_NOTIFICATION_PRIORITY in userInfo: - priority = userInfo[GROWL_NOTIFICATION_PRIORITY] - else: - priority = 0 + priority = userInfo.get(GROWL_NOTIFICATION_PRIORITY, 0) if GROWL_NOTIFICATION_STICKY in userInfo: sticky = userInfo[GROWL_NOTIFICATION_STICKY] else: |