Skip to content

Commit ce485c5

Browse files
authored
updater needs to take care not only started from an env (#1543)
* fix updater for none env calls * prepare v7.0.4
1 parent c291001 commit ce485c5

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

CHANGES.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ Changelog
22
=========
33

44

5+
Version 7.0.4
6+
~~~~~~~~~~~~~
7+
8+
Bug fix release
9+
10+
All changes:
11+
https://github.com/Open-MSS/MSS/milestone/88?closed=1
12+
13+
14+
515
Version 7.0.3
616
~~~~~~~~~~~~~
717

mslib/utils/qt.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -448,15 +448,18 @@ def __init__(self, parent=None):
448448
self.old_version = None
449449
# we are using the installer version of the env
450450
self.conda_prefix = os.getenv("CONDA_PREFIX")
451-
self.command = os.path.join(self.conda_prefix, 'bin', "conda")
452-
mamba_cmd = os.path.join(self.conda_prefix, 'bin', 'mamba')
453-
# Check if mamba is installed in the env
454-
try:
455-
subprocess.run([mamba_cmd], startupinfo=subprocess_startupinfo(),
456-
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
457-
self.command = mamba_cmd
458-
except FileNotFoundError:
459-
pass
451+
if self.conda_prefix is not None:
452+
self.command = os.path.join(self.conda_prefix, 'bin', "conda")
453+
mamba_cmd = os.path.join(self.conda_prefix, 'bin', 'mamba')
454+
# Check if mamba is installed in the env
455+
try:
456+
subprocess.run([mamba_cmd], startupinfo=subprocess_startupinfo(),
457+
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
458+
self.command = mamba_cmd
459+
except FileNotFoundError:
460+
pass
461+
else:
462+
self.command = "conda"
460463

461464
# pyqtSignals don't work without an application eventloop running
462465
if QtCore.QCoreApplication.startingUp():

mslib/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424
See the License for the specific language governing permissions and
2525
limitations under the License.
2626
"""
27-
__version__ = u'7.0.3.'
27+
__version__ = u'7.0.4.'

0 commit comments

Comments
 (0)