From 0f078778b561e25cffed739c1ea7f97ff35554c9 Mon Sep 17 00:00:00 2001
From: pconesa
Date: Fri, 9 Aug 2024 16:47:59 +0200
Subject: [PATCH] Fix config --overwrite: scipion.template (deleted) not
needed.
---
CHANGES.txt | 2 ++
scipion/__init__.py | 2 +-
scipion/install/plugin_funcs.py | 4 +---
scipion/scripts/config.py | 6 +++---
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 021ff37b..de3c04d9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,5 @@
+V3.6.1
+ - Fix config --overwrite: scipion.template (deleted) not needed.
V3.6.0
- Template window shows browser icons
- Template window adapted to use workflow hub templates
diff --git a/scipion/__init__.py b/scipion/__init__.py
index 74e02f24..2e30f035 100644
--- a/scipion/__init__.py
+++ b/scipion/__init__.py
@@ -1,2 +1,2 @@
-__version__ = '3.6.0'
+__version__ = '3.6.1'
diff --git a/scipion/install/plugin_funcs.py b/scipion/install/plugin_funcs.py
index c7de740c..70973699 100644
--- a/scipion/install/plugin_funcs.py
+++ b/scipion/install/plugin_funcs.py
@@ -10,7 +10,7 @@
from pwem import Domain
from pyworkflow.utils import redStr, yellowStr
from pyworkflow.utils.path import cleanPath
-from pyworkflow import LAST_VERSION, CORE_VERSION, OLD_VERSIONS, Config
+from pyworkflow import LAST_VERSION, CORE_VERSION, Config
from importlib import reload
NULL_VERSION = "0.0.0"
@@ -30,8 +30,6 @@
PIP_UNINSTALL_CMD = '{0} -m pip uninstall -y %s'.format(
Environment.getPython())
-versions = list(OLD_VERSIONS) + [LAST_VERSION]
-
class PluginInfo(object):
diff --git a/scipion/scripts/config.py b/scipion/scripts/config.py
index 954c2bea..c594b5fc 100644
--- a/scipion/scripts/config.py
+++ b/scipion/scripts/config.py
@@ -196,9 +196,6 @@ def createConf(fpath, ftemplate, unattended=False):
print(yellow("* Creating configuration file: %s" % fpath))
print("Please edit it to reflect the configuration of your system.\n")
- if not os.path.exists(ftemplate):
- raise FileNotFoundError('Missing file: %s' % ftemplate)
-
# Special case for scipion config
if getTemplateName(SCIPION_CONF) in ftemplate:
@@ -214,6 +211,9 @@ def createConf(fpath, ftemplate, unattended=False):
# Create the actual configuration file.
cf.write(open(fpath, 'w'))
else:
+ if not os.path.exists(ftemplate):
+ raise FileNotFoundError('Missing file: %s' % ftemplate)
+
# For host.conf and protocols.conf, just copy files
copyfile(ftemplate, fpath)