diff options
author | 2021-05-09 11:36:57 +0100 | |
---|---|---|
committer | 2021-05-09 11:36:57 +0100 | |
commit | 2b5da3fb3aa2c32306a3bb7a6fd086277bd8bc94 (patch) | |
tree | 3e0a881f936768556f3a56d2d52a94f288ad6391 | |
parent | Update warn to warning, due to deprecation (diff) |
Remove unneeded context manager in Metabase cog
StringIO as it has no underlying connections, so a context manager is not needed
Co-authored-by: Numerlor <[email protected]>
-rw-r--r-- | bot/exts/moderation/metabase.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bot/exts/moderation/metabase.py b/bot/exts/moderation/metabase.py index c40b6b7e9..83c63c0f2 100644 --- a/bot/exts/moderation/metabase.py +++ b/bot/exts/moderation/metabase.py @@ -129,8 +129,7 @@ class Metabase(Cog): if extension == "csv": out = await resp.text() # Save the output for use with int e - with StringIO(out) as f: - self.exports[question_id] = list(csv.DictReader(f)) + self.exports[question_id] = list(csv.DictReader(StringIO(out))) elif extension == "json": out = await resp.json() |