Commit 2412c1e5 authored by sparonuz's avatar sparonuz
Browse files

[master]: The load vault need to be an external function

parent abf8ed35
...@@ -5,6 +5,13 @@ import AutoRPE.UtilsRPE.Error as Error ...@@ -5,6 +5,13 @@ import AutoRPE.UtilsRPE.Error as Error
import warnings import warnings
def load_vault(path):
import pickle
try:
return pickle.load(open(path, "rb"))
except IOError:
return None
class Vault: class Vault:
def __init__(self, path_to_input_sources=None): def __init__(self, path_to_input_sources=None):
self.modules = [] self.modules = []
...@@ -288,13 +295,6 @@ class Vault: ...@@ -288,13 +295,6 @@ class Vault:
variable.mutable = False variable.mutable = False
counter += 1 counter += 1
def load_vault(self, path):
import pickle
try:
return pickle.load(open(path, "rb"))
except IOError:
return None
def save(self, path): def save(self, path):
# This workaround is needed to allow pickle to write the file, don't know yet about its risks # This workaround is needed to allow pickle to write the file, don't know yet about its risks
import sys import sys
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment