Skip to content

Commit

Permalink
Improve error message when you can't find e.g. the manifest
Browse files Browse the repository at this point in the history
I've left in the attempt to recover, but I don't think it can
work.  But it's a RPism that I can't prove to always fail.
  • Loading branch information
RobertLuptonTheGood committed Oct 24, 2016
1 parent 6412230 commit 3fcfb38
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion python/eups/distrib/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,17 @@ def getFileForProduct(self, path, product, version, flavor,
return self.getFileForProduct(path, product, version, flavor,
'PRODUCT_FILE', filename, noaction)

# this shouldn't happen
# The comment at the line is, "this shouldn't happen"
# and I (RHL) think it's due to the file being unavailable.
#
# I didn't write this code, and I know that it's unreliable,
# so I'm assuming that this attempt to recover a file with path == ""
# is hopeless
if not path:
raise RuntimeError("Unable to retrieve file")

print("'This shouldn't happen': Retrieving %s for (%s, %s, %s) failed; continuing in desperation" %
(ftype, product, version, flavor), file=self.log)
return DistribServer.getFileForProduct(self, path, product, version,
flavor, None, filename,
noaction)
Expand Down

0 comments on commit 3fcfb38

Please sign in to comment.