From 3fcfb387e9aa97ffa82c6ff1629394bca369149a Mon Sep 17 00:00:00 2001 From: Robert Lupton the Good Date: Mon, 24 Oct 2016 17:14:54 -0400 Subject: [PATCH] Improve error message when you can't find e.g. the manifest 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. --- python/eups/distrib/server.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/python/eups/distrib/server.py b/python/eups/distrib/server.py index ce929605..bb1274e9 100644 --- a/python/eups/distrib/server.py +++ b/python/eups/distrib/server.py @@ -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)