From 055ad389bc88f4278549f87fb4733f6174dc608a Mon Sep 17 00:00:00 2001 From: alfonsocv12 Date: Tue, 11 May 2021 16:43:34 -0600 Subject: [PATCH 1/2] Fix error on update requirements.txt --- mmp/cli/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mmp/cli/main.py b/mmp/cli/main.py index 513933e..3441721 100644 --- a/mmp/cli/main.py +++ b/mmp/cli/main.py @@ -232,6 +232,7 @@ def __update_requirements(self, name: str, version=None, remove=False): ''' Function dedicated to update requirements.txt with the new lib ''' + name = name.lower().strip(' ') requirements = open('requirements.txt', 'r+') requirements_read: list = requirements.readlines() if remove: @@ -244,8 +245,9 @@ def __update_requirements(self, name: str, version=None, remove=False): f'{name}=={version}\n' ) requirements_write = ''.join(sorted(requirements_read)) - requirements.truncate(0) + requirements.seek(0) requirements.write(requirements_write) + requirements.truncate() requirements.close() def __check_lib_installed(self, lib_name: str): From 1ce8e4c94c4a2d58e3a1d5bc1ce95c912d637e1d Mon Sep 17 00:00:00 2001 From: alfonsocv12 Date: Tue, 11 May 2021 16:44:16 -0600 Subject: [PATCH 2/2] Adding new tag --- mmp/__init__.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mmp/__init__.py b/mmp/__init__.py index cd383f7..ec5cc65 100644 --- a/mmp/__init__.py +++ b/mmp/__init__.py @@ -1 +1 @@ -__version__='0.0.4a' +__version__='0.0.5a' diff --git a/setup.py b/setup.py index 0204c0a..034282c 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='mmp', - version='0.0.4', + version='0.0.5', authro='Alfonso Villaobos', author_email='alfonso@codepeat.com', url='https://github.com/alfonsocv12/mmp',