mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-10-30 22:01:57 +01:00
Update golfsim.py
This commit is contained in:
1 parent
434f8aeb28
commit
3371264c50
1 file changed
+2
-2
@@ -105,8 +105,8 @@ def getHighScoreGolf(nodeID, strokes, par):
|
|||||||
try:
|
try:
|
||||||
with open('data/golfsim_hs.pkl', 'rb') as f:
|
with open('data/golfsim_hs.pkl', 'rb') as f:
|
||||||
golfHighScore = pickle.load(f)
|
golfHighScore = pickle.load(f)
|
||||||
except:
|
except Exception as e:
|
||||||
logger.debug("System: GolfSim: High Score file not found.")
|
logger.debug(f"System: GolfSim: High Score file not found, creating new one: {e}")
|
||||||
golfHighScore = [{'nodeID': nodeID, 'strokes': strokes, 'par': par}]
|
golfHighScore = [{'nodeID': nodeID, 'strokes': strokes, 'par': par}]
|
||||||
with open('data/golfsim_hs.pkl', 'wb') as f:
|
with open('data/golfsim_hs.pkl', 'wb') as f:
|
||||||
pickle.dump(golfHighScore, f)
|
pickle.dump(golfHighScore, f)
|
||||||
|
|||||||
Reference in new issue
Block a user