From 17469e3fca865618c1dc04155bd5edfc414d59d1 Mon Sep 17 00:00:00 2001 From: Yu Otsubo Date: Sat, 20 Apr 2019 11:27:18 +0900 Subject: [PATCH] fix codesmell --- ebook_homebrew/rest.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ebook_homebrew/rest.py b/ebook_homebrew/rest.py index 021634b..ad39a38 100644 --- a/ebook_homebrew/rest.py +++ b/ebook_homebrew/rest.py @@ -139,10 +139,12 @@ def convert_content_type_to_extension(content_type): """ if content_type == "image/jpeg": - return "jpg" + extension = "jpg" elif content_type == "image/png": - return "png" + extension = "png" elif content_type == "image/gif": - return "gif" + extension = "gif" + else: + extension = False - return False + return extension