Fixed pass statements that were literally doing nothing.
This commit is contained in:
parent
7bf9792273
commit
cc14dd210c
@ -15,13 +15,20 @@ from ConfigParser import ConfigParser
|
|||||||
|
|
||||||
def enable_notifications(options):
|
def enable_notifications(options):
|
||||||
if options.pushbullet:
|
if options.pushbullet:
|
||||||
|
fail = False
|
||||||
|
try:
|
||||||
pb = Pushbullet(options.pushbullet)
|
pb = Pushbullet(options.pushbullet)
|
||||||
if options.pbdevice:
|
except:
|
||||||
|
print "Problem wtih connecting to pushbullet. API Key likely invalid"
|
||||||
|
fail = True
|
||||||
|
if options.pbdevice and not fail:
|
||||||
try:
|
try:
|
||||||
pb = pb.get_device(options.pbdevice)
|
pb = pb.get_device(options.pbdevice)
|
||||||
except:
|
except:
|
||||||
print "Cannot get this device."
|
print "Cannot get this device."
|
||||||
|
fail = True
|
||||||
pass
|
pass
|
||||||
|
if not fail:
|
||||||
temp_note = Notification()
|
temp_note = Notification()
|
||||||
temp_note.send_notification = pb.push_note
|
temp_note.send_notification = pb.push_note
|
||||||
yield temp_note
|
yield temp_note
|
||||||
|
Loading…
Reference in New Issue
Block a user