From 7dbc6d6d60613e4b453a68b621eb5601cbfe0955 Mon Sep 17 00:00:00 2001 From: tripleee Date: Sun, 4 Aug 2019 15:35:53 +0300 Subject: [PATCH] Remove extraneous 'import pickle' statements Also, a few except handlers in Bot.py specific to pickle --- Source/Bot.py | 6 ------ Source/ChatRoom.py | 1 - build/lib/BotpySE/Bot.py | 1 - build/lib/BotpySE/ChatRoom.py | 1 - 4 files changed, 9 deletions(-) diff --git a/Source/Bot.py b/Source/Bot.py index e86ebee..ab9ec48 100644 --- a/Source/Bot.py +++ b/Source/Bot.py @@ -399,9 +399,6 @@ def _save_users(self): except IOError as ioerr: logging.error("IOError occurred: ") logging.error(str(ioerr)) - except pickle.PickleError as perr: - logging.error("Pickling error occurred: ") - logging.error(str(perr)) def _load_users(self): for room in self._rooms: @@ -415,9 +412,6 @@ def _load_users(self): except IOError as ioerr: logging.error("IOError occurred: ") logging.error(str(ioerr)) - except pickle.PickleError as perr: - logging.error("Pickling error occurred: ") - logging.error(str(perr)) def _convert_to_save_filename(self, id): return self._storage_prefix + self.name.replace(' ', '_') + '_room_' + str(id) + '_data' diff --git a/Source/ChatRoom.py b/Source/ChatRoom.py index 035d1f6..70fe58a 100644 --- a/Source/ChatRoom.py +++ b/Source/ChatRoom.py @@ -7,7 +7,6 @@ # import os -import pickle import weakref import logging diff --git a/build/lib/BotpySE/Bot.py b/build/lib/BotpySE/Bot.py index 122e9cc..331ffb4 100644 --- a/build/lib/BotpySE/Bot.py +++ b/build/lib/BotpySE/Bot.py @@ -14,7 +14,6 @@ from . import Utilities import os -import pickle import json import jsonpickle as jp diff --git a/build/lib/BotpySE/ChatRoom.py b/build/lib/BotpySE/ChatRoom.py index d567bb0..51a3c68 100644 --- a/build/lib/BotpySE/ChatRoom.py +++ b/build/lib/BotpySE/ChatRoom.py @@ -8,7 +8,6 @@ import chatexchange as ce import os -import pickle import weakref from . import ChatUser