Flushing pluginPrefs to disk?

Posted on
Fri Oct 26, 2018 2:47 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Flushing pluginPrefs to disk?

I've noticed that if my plugin crashes fairly soon after I writing a preference, it's not actually saved.

Code: Select all
                self.pluginPrefs[REFRESH_TOKEN_PLUGIN_PREF + str(dev.id)] = ecobeeAccount.refresh_token


Is there some way to force the write?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Oct 26, 2018 11:28 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Flushing pluginPrefs to disk?

Yes:

Code: Select all
plugin.savePluginPrefs()

Image

Posted on
Sat Oct 27, 2018 6:14 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Flushing pluginPrefs to disk?

Thanks.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 6 guests