From b5ecb02154d259274d439bb9aac804241e0ab697 Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Fri, 1 Dec 2017 23:03:28 -0500 Subject: [PATCH] Move some control flow logic --- pipenv/utils.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pipenv/utils.py b/pipenv/utils.py index 5ec00bdf..0efbfc85 100644 --- a/pipenv/utils.py +++ b/pipenv/utils.py @@ -950,11 +950,12 @@ def split_section(input_file, section_suffix, test_function): lockfile_sections = ('default', 'develop') if any(section in input_file for section in pipfile_sections): sections = pipfile_sections - elif any(section in input_file for section in lockfile_sections): - sections = lockfile_sections - # return the original file if we can't find any pipfile or lockfile sections else: - return input_file + if any(section in input_file for section in lockfile_sections): + sections = lockfile_sections + else: + # return the original file if we can't find any pipfile or lockfile sections + return input_file for section in sections: split_dict = {}