Greg Neagle

Results 119 comments of Greg Neagle

This is triggered by the `killall NotificationCenter` that NCutil.py does after making a change. You can replicate the issue by turning on Do Not Disturb and then doing `killall NotificationCenter`....

One uses the `-currentHost` flag to read and write ByHost preferences: `defaults -currentHost read com.apple.notificationcenterui` There are CFPreferences methods that can be called from Python to the same effect. But...

In Mavericks: ``` % defaults -currentHost read com.apple.notificationcenterui { doNotDisturb = 0; doNotDisturbMirrored = 1; } ``` Now I pull down the Notification Center menu and enable Do Not Disturb....

Removing the `.encode('utf-8')` "fixes" the issue as long as the username contains only ASCII characters, but leads to errors/problems if there are non-ASCII characters in the name. I'll need to...

I've made (and minimally tested) a change that addresses the issue on Python 3. I have not yet tested to see if it breaks things under Python 2. (This machine...

...and these changes break on Python 2. As tempting as it might be to abandon Python 2 right now, I suspect a fair number of people are still using it.

OK. Latest push seems to work under both Python 2 and 3; tested under both with a username containing non-ASCII characters, and a password containing non-ASCII characters.

This looks like the right solution for Python2 at least. I want to test under Python3 as well. Could you provide some sample input that triggers the problem? I suppose...

I'd think the somewhat broken state you refer to would really only be a problem if that account was the _only_ Secure Token account on the Mac, something I'd recommend...

"Unless there is some way to get things back in sync": perhaps deleting the account entirely and re-creating it would do that.