Skip to content

Commit 7e16662

Browse files
author
Zach Moody
authored
Merge pull request #331 from markkuleinio/fix-pickling
Add __getstate__ and __setstate__ methods in PluginsApp to fix #329
2 parents 873ff43 + 00a29dd commit 7e16662

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pynetbox/core/app.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ class PluginsApp(object):
148148
def __init__(self, api):
149149
self.api = api
150150

151+
def __getstate__(self):
152+
return self.__dict__
153+
154+
def __setstate__(self, d):
155+
self.__dict__.update(d)
156+
151157
def __getattr__(self, name):
152158
return App(self.api, "plugins/{}".format(name))
153159

0 commit comments

Comments
 (0)