mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-02-05 22:00:18 +00:00
* Update settings * Whitespace changes * Comment out merger hooks in gitattributes Corrupt maps would have to be resolved in repo before hooks could be updated * Revert "Whitespace changes" This reverts commitafbdd1d844. * Whitespace again minus example * Gitignore example changelog * Restore changelog merge setting * Keep older dmi hook attribute until hooks can be updated * update vscode settings too * Renormalize remaining * Revert "Gitignore example changelog" This reverts commitde22ad375d. * Attempt to normalize example.yml (and another file I guess) * Try again
25 lines
518 B
Python
25 lines
518 B
Python
import pickle
|
|
def save(filename,data,dnrw=0):
|
|
if dnrw == 1:
|
|
try:
|
|
tiedosto = open(filename,"r")
|
|
except:
|
|
tiedosto = open(filename,"w")
|
|
else:
|
|
return False
|
|
else:
|
|
tiedosto = open(filename,"w")
|
|
|
|
if "http//" in data:
|
|
data = data.replace("http//","http://")
|
|
pickle.dump(data,tiedosto)
|
|
tiedosto.close()
|
|
def load(filename):
|
|
try:
|
|
tiedosto = open(filename,"r")
|
|
except IOError:
|
|
return "ERROR ERROR ERROR ERR"
|
|
a = pickle.load(tiedosto)
|
|
tiedosto.close()
|
|
return a
|