Skip to content

Commit

Permalink
fix exception raising
Browse files Browse the repository at this point in the history
  • Loading branch information
mesmith75 committed Jul 8, 2024
1 parent cda3ea8 commit 491e489
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ganga/GangaCore/Core/GangaRepository/SubJobXMLList.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self, jobDirectory='', registry=None, dataFileName='data', load_bac
registry (Registry): the registry managing me,
dataFileName (str): incase it ever changes, normally 'data'
load_backup (bool): are we using the backpus only/first? This used to be set like this btw
paret (Job): parent of self after constuction
parent (Job): parent of self after constuction
"""
super(SubJobXMLList, self).__init__()

Expand Down Expand Up @@ -126,7 +126,7 @@ def appendJobs(self, job_dict, parent):
# First check the id is not already in the job cache
for k in job_dict.keys():
if k in self._cachedJobs.keys():
raise RepositoryError("Subjob key %s is already in the subjob XML cache!" % k)
raise RepositoryError(self._registry.repository, "Subjob key %s is already in the subjob XML cache!" % k)
# Now set the parent for the new subjobs
for k, v in job_dict.items():
v._setParent(parent)
Expand Down Expand Up @@ -414,7 +414,7 @@ def _getItem(self, index):
if isinstance(x, IOError) and x.errno == errno.ENOENT:
raise IOError("Subobject %s not found: %s" % (index, x))
else:
raise RepositoryError(self, "IOError on loading subobject %s: %s" % (index, x))
raise RepositoryError(self._registry.repository, "IOError on loading subobject %s: %s" % (index, x))

from GangaCore.Core.GangaRepository.VStreamer import from_file

Expand Down

0 comments on commit 491e489

Please sign in to comment.