Add kwargs to fs_cleanup usage

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-07-26 15:16:37 -04:00
parent 9752584135
commit 85b05dd6ec
2 changed files with 3 additions and 3 deletions

View File

@@ -146,7 +146,7 @@ class ConverterBase(object):
logger.error('Exception launching Libre Office; %s', exception)
raise
finally:
fs_cleanup(libreoffice_home_directory)
fs_cleanup(filename=libreoffice_home_directory)
# LibreOffice return a PDF file with the same name as the input
# provided but with the .pdf extension.
@@ -180,7 +180,7 @@ class ConverterBase(object):
shutil.copyfileobj(
fsrc=converted_file_object, fdst=temporary_converted_file_object
)
fs_cleanup(converted_file_path)
fs_cleanup(filename=converted_file_path)
temporary_converted_file_object.seek(0)
return temporary_converted_file_object

View File

@@ -238,7 +238,7 @@ class StagingFolderViewTestCase(GenericViewTestCase):
self.filename = os.path.basename(TEST_SMALL_DOCUMENT_PATH)
def tearDown(self):
fs_cleanup(self.temporary_directory)
fs_cleanup(filename=self.temporary_directory)
super(StagingFolderViewTestCase, self).tearDown()
def _request_staging_file_delete_view(self, staging_folder, staging_file):