Add kwargs to fs_cleanup usage
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -146,7 +146,7 @@ class ConverterBase(object):
|
|||||||
logger.error('Exception launching Libre Office; %s', exception)
|
logger.error('Exception launching Libre Office; %s', exception)
|
||||||
raise
|
raise
|
||||||
finally:
|
finally:
|
||||||
fs_cleanup(libreoffice_home_directory)
|
fs_cleanup(filename=libreoffice_home_directory)
|
||||||
|
|
||||||
# LibreOffice return a PDF file with the same name as the input
|
# LibreOffice return a PDF file with the same name as the input
|
||||||
# provided but with the .pdf extension.
|
# provided but with the .pdf extension.
|
||||||
@@ -180,7 +180,7 @@ class ConverterBase(object):
|
|||||||
shutil.copyfileobj(
|
shutil.copyfileobj(
|
||||||
fsrc=converted_file_object, fdst=temporary_converted_file_object
|
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)
|
temporary_converted_file_object.seek(0)
|
||||||
return temporary_converted_file_object
|
return temporary_converted_file_object
|
||||||
|
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ class StagingFolderViewTestCase(GenericViewTestCase):
|
|||||||
self.filename = os.path.basename(TEST_SMALL_DOCUMENT_PATH)
|
self.filename = os.path.basename(TEST_SMALL_DOCUMENT_PATH)
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
fs_cleanup(self.temporary_directory)
|
fs_cleanup(filename=self.temporary_directory)
|
||||||
super(StagingFolderViewTestCase, self).tearDown()
|
super(StagingFolderViewTestCase, self).tearDown()
|
||||||
|
|
||||||
def _request_staging_file_delete_view(self, staging_folder, staging_file):
|
def _request_staging_file_delete_view(self, staging_folder, staging_file):
|
||||||
|
|||||||
Reference in New Issue
Block a user