diff --git a/docker/rucio_client/scripts/CMSRSE.py b/docker/rucio_client/scripts/CMSRSE.py index 4966479..d0d43f5 100644 --- a/docker/rucio_client/scripts/CMSRSE.py +++ b/docker/rucio_client/scripts/CMSRSE.py @@ -435,9 +435,9 @@ def _get_protocol(self, proto_json, protos_json): for rule in tfc: prefix_regex = re.compile(rule['path']) if self.cms_type == "test": - prefix_match = prefix_regex.match("/store/test/rucio") + prefix_match = prefix_regex.match("/store/test/rucio/") else: - prefix_match = prefix_regex.match("/store/temp") + prefix_match = prefix_regex.match("/store/temp/") if prefix_match: match_rule = rule['path'] g1 = prefix_match.group(1) @@ -458,6 +458,10 @@ def _get_protocol(self, proto_json, protos_json): # if we're here chances are that the prefix didn't have a prefixed "scheme://" logging.debug("couldn't find a scheme when calculating special prefix") + # Make sure that prefix always ends with "/" + if prefix[len(prefix) - 1] != "/": + prefix = prefix + "/" + proto['prefix'] = prefix # Get rid of the TFC since were are using a prefix but don't get rid # of the web_service_path if it is there @@ -583,4 +587,4 @@ def show_proto(self, scheme): schemes = [scheme] for proto in self.protocols: if proto['scheme'] in schemes: - print(json.dumps(proto, sort_keys=False, indent=4)) + print(json.dumps(proto, sort_keys=False, indent=4)) \ No newline at end of file