Skip to content

Commit e06b58f

Browse files
committed
Merge branch 'chore---NY-2025' into split-nrpe-convenience-methods
2 parents 5a72a8a + 967e1b0 commit e06b58f

File tree

13 files changed

+22
-14
lines changed

13 files changed

+22
-14
lines changed

lib/vsc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2015-2024 Ghent University
2+
# Copyright 2015-2025 Ghent University
33
#
44
# This file is part of vsc-utils,
55
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),

lib/vsc/utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2015-2024 Ghent University
2+
# Copyright 2015-2025 Ghent University
33
#
44
# This file is part of vsc-utils,
55
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),

lib/vsc/utils/availability.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2012-2024 Ghent University
2+
# Copyright 2012-2025 Ghent University
33
#
44
# This file is part of vsc-utils,
55
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),

lib/vsc/utils/cache.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2012-2024 Ghent University
2+
# Copyright 2012-2025 Ghent University
33
#
44
# This file is part of vsc-utils,
55
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
@@ -143,7 +143,13 @@ def load(self, key):
143143
144144
@returns: (timestamp, data) if there is data for the given key, None otherwise.
145145
"""
146-
return self.new_shelf.get(key, None) or self.shelf.get(key, None)
146+
result = None
147+
if self.new_shelf is not None:
148+
result = self.new_shelf.get(key, None)
149+
if result is None and self.shelf is not None:
150+
return self.shelf.get(key, None)
151+
152+
return result
147153

148154
def retain(self):
149155
"""Retain non-updated data on close."""
@@ -163,6 +169,8 @@ def close(self):
163169
self.log.error('cannot open the file cache at %s for writing', self.filename)
164170
else:
165171
if self.retain_old:
172+
if self.shelf is None:
173+
self.shelf = {}
166174
self.shelf.update(self.new_shelf)
167175
self.new_shelf = self.shelf
168176

lib/vsc/utils/fs_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2012-2024 Ghent University
2+
# Copyright 2012-2025 Ghent University
33
#
44
# This file is part of vsc-utils,
55
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),

lib/vsc/utils/graphyte.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2024-2024 Ghent University
2+
# Copyright 2024-2025 Ghent University
33
#
44
# This file is part of vsc-utils,
55
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),

lib/vsc/utils/lock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2012-2024 Ghent University
2+
# Copyright 2012-2025 Ghent University
33
#
44
# This file is part of vsc-utils,
55
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),

lib/vsc/utils/nagios.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2012-2024 Ghent University
2+
# Copyright 2012-2025 Ghent University
33
#
44
# This file is part of vsc-utils,
55
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),

lib/vsc/utils/pickle_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2012-2024 Ghent University
2+
# Copyright 2012-2025 Ghent University
33
#
44
# This file is part of vsc-utils,
55
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),

lib/vsc/utils/rest_oauth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2012-2024 Ghent University
2+
# Copyright 2012-2025 Ghent University
33
#
44
# This file is part of vsc-utils,
55
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),

0 commit comments

Comments
 (0)