From 142a7fcf48cfa9380eb644bb3d130cf1cffc3fc6 Mon Sep 17 00:00:00 2001 From: Rich Oberholtzer Date: Sun, 12 Apr 2020 14:59:07 -0400 Subject: [PATCH] forgot awaits --- r0b3bot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/r0b3bot.py b/r0b3bot.py index 0f95bee..d1cd6c1 100644 --- a/r0b3bot.py +++ b/r0b3bot.py @@ -626,7 +626,7 @@ async def spsub_T(ctx, service = "NONE"): print(">> Reading in spsublist.dat") if os.path.exists('spsublist.dat'): with open('spsublist.dat', 'rb') as datafile: - spsublist = pickle.load(datafile) + spsublist = await pickle.load(datafile) else: print(">> spsublist.dat does not exist, new file will be created") @@ -637,7 +637,7 @@ async def spsub_T(ctx, service = "NONE"): #Write updated array to data file print(">> Writing updated array to spsublist.dat") with open('spsublist.dat', 'wb') as datafile: - pickle.dump(spsublist, datafile) + await pickle.dump(spsublist, datafile) print(">> Done") await ctx.send(f"'{service_state['name']}' added to monitored services") @@ -662,7 +662,7 @@ async def StatPing_Monitor(): print("Statping Monitor: Reading in spsublist.dat") if os.path.exists('spsublist.dat'): with open('spsublist.dat', 'rb') as datafile: - spsublist = pickle.load(datafile) + spsublist = await pickle.load(datafile) for subscription in spsublist: @@ -700,7 +700,7 @@ async def StatPing_Monitor(): # Write status changes to spsublist.dat with open('spsublist.dat', 'w') as datafile: - pickle.dump(new_spsublist, datafile) + await pickle.dump(new_spsublist, datafile) else: print(">> spsublist.dat does not exist, nothing to do.")