only call recase_file once

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2017-09-07 17:01:15 -04:00
parent 0433fd2364
commit bb0719f8ae
2 changed files with 6 additions and 1 deletions
+2
View File
@@ -174,6 +174,8 @@ def ensure_pipfile(validate=True):
else:
project.add_package_to_pipfile(str(package.req))
project.recase_pipfile()
else:
click.echo(crayons.yellow('Creating a Pipfile for this project...'), err=True)
# Create the pipfile if it doesn't exist.
+4 -1
View File
@@ -273,4 +273,7 @@ class Project(object):
p[key][package_name] = package[package_name]
# Write Pipfile.
self.write_toml(recase_file(p))
self.write_toml(p)
def recase_pipfile(self):
self.write_toml(recase_file(self._pipfile))