From a97fcb9e58f9607990a595a9a2d940ca908ae4c8 Mon Sep 17 00:00:00 2001 From: Josue Kouka Date: Wed, 14 Oct 2015 11:34:06 +0200 Subject: [PATCH] fix #40: better handling of filename extension --- yahoo_oauth/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yahoo_oauth/utils.py b/yahoo_oauth/utils.py index bd9b8ca..f6642aa 100644 --- a/yahoo_oauth/utils.py +++ b/yahoo_oauth/utils.py @@ -29,14 +29,14 @@ def get_file_extension(filename): def get_data(filename): """Calls right function according to file extension """ - ext = get_file_extension(filename) + name, ext = get_file_extension(filename) func = json_get_data if ext == '.json' else yaml_get_data return func(filename) def write_data(data, filename): """Call right func to save data according to file extension """ - ext = get_file_extension(filename) + name, ext = get_file_extension(filename) func = json_write_data if ext == '.json' else yaml_write_data return func(data, filename)