From 5db2d04140c1216cda0a4735208502d599554c41 Mon Sep 17 00:00:00 2001 From: Giovanni La Mura <giovanni.lamura@inaf.it> Date: Mon, 14 Apr 2025 15:33:06 +0200 Subject: [PATCH] Update copyright to 2025 and use environment detection for python3 engine --- src/scripts/model_maker.py | 8 ++++++-- src/scripts/pycompare.py | 2 +- src/scripts/pydynrange.py | 4 ++-- src/scripts/pytiming.py | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/scripts/model_maker.py b/src/scripts/model_maker.py index a1ab00cf..db848890 100755 --- a/src/scripts/model_maker.py +++ b/src/scripts/model_maker.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (C) 2024 INAF - Osservatorio Astronomico di Cagliari +# Copyright (C) 2025 INAF - Osservatorio Astronomico di Cagliari # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -145,7 +145,11 @@ def load_model(model_file): print("ERROR: " + model_file + " was not found!") if model is not None: max_rad = 0.0 - make_3d = False if model['system_settings']['make_3D'] == "0" else True + make_3d = False + try: + if model['system_settings']['make_3D'] == "0" else True + except KeyError: + make_3d = False if (make_3d and not allow_3d): print("WARNING: 3D visualization of models is not available. Disabling.") make_3d = False diff --git a/src/scripts/pycompare.py b/src/scripts/pycompare.py index bd061b11..778e4055 100755 --- a/src/scripts/pycompare.py +++ b/src/scripts/pycompare.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (C) 2024 INAF - Osservatorio Astronomico di Cagliari +# Copyright (C) 2025 INAF - Osservatorio Astronomico di Cagliari # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/scripts/pydynrange.py b/src/scripts/pydynrange.py index 491f68f8..5dd250a3 100755 --- a/src/scripts/pydynrange.py +++ b/src/scripts/pydynrange.py @@ -1,6 +1,6 @@ -#!/bin/python3 +#!/usr/bin/env python3 -# Copyright (C) 2024 INAF - Osservatorio Astronomico di Cagliari +# Copyright (C) 2025 INAF - Osservatorio Astronomico di Cagliari # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/scripts/pytiming.py b/src/scripts/pytiming.py index bc1ab97a..c2d2e99e 100755 --- a/src/scripts/pytiming.py +++ b/src/scripts/pytiming.py @@ -1,6 +1,6 @@ -#!/bin/python3 +#!/usr/bin/env python3 -# Copyright (C) 2024 INAF - Osservatorio Astronomico di Cagliari +# Copyright (C) 2025 INAF - Osservatorio Astronomico di Cagliari # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -- GitLab