diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cfebcb..7c934c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 1.4.1 +- fix copy_and_hack_decorator (was not returning the decorated function output) + # 1.4.0 - count_occurences / replace_value: add copy_and_hack decorator to run on tscan output files - Update to pdal 2.6+ to better handle classification values and flags in replace_attribute_in_las diff --git a/pdaltools/_version.py b/pdaltools/_version.py index 58bca5c..8e8657e 100644 --- a/pdaltools/_version.py +++ b/pdaltools/_version.py @@ -1,4 +1,4 @@ -__version__ = "1.4.0" +__version__ = "1.4.1" if __name__ == "__main__": diff --git a/pdaltools/unlock_file.py b/pdaltools/unlock_file.py index ac9c1d1..d42f658 100644 --- a/pdaltools/unlock_file.py +++ b/pdaltools/unlock_file.py @@ -43,7 +43,8 @@ def newfn(*args, **kwargs): with tempfile.NamedTemporaryFile(suffix=os.path.splitext(in_file)[-1]) as tmp: copy_and_hack_input_file(in_file, tmp.name) args[0] = tmp.name - func(*args, **kwargs) + + return func(*args, **kwargs) else: raise e diff --git a/test/test_unlock.py b/test/test_unlock.py index 5fb53c2..742b69c 100644 --- a/test/test_unlock.py +++ b/test/test_unlock.py @@ -28,7 +28,8 @@ def decorated_pdal_info_json(input_file: str): def test_copy_and_hack_decorator_simple(): TMP_FILE = os.path.join(TMPDIR, "copy_and_hack_simple.laz") shutil.copy(LAZ_FILE, TMP_FILE) - decorated_pdal_info_json(TMP_FILE) + ret = decorated_pdal_info_json(TMP_FILE) + assert ret # Check that the return value of the decorated function is returned @pytest.mark.geoportail