Skip to content

Commit 1995f40

Browse files
committed
Not supposed to be on this branch
1 parent 399c7a9 commit 1995f40

2 files changed

Lines changed: 9 additions & 21 deletions

File tree

src/murfey/client/context.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,9 @@ def ensure_dcg_exists(
8989
if not windows_path:
9090
logger.warning("No atlas metadata path found")
9191
return None
92-
if environment.visit in windows_path.split("\\"):
93-
# Case of atlas in the correct location
94-
visit_index = windows_path.split("\\").index(environment.visit)
95-
partial_path = "/".join(windows_path.split("\\")[visit_index + 1 :])
96-
logger.info(
97-
f"Partial Linux path successfully constructed from Windows path: {partial_path}"
98-
)
99-
else:
100-
# Atlas not in visit, so come up with where it should have been
101-
# Assumes /structure/to/Supervisor/Sample/Atlas/Atlas.dm
102-
partial_path = "/".join(windows_path.split("\\")[-4:])
103-
logger.info(f"Partial Linux path estimated: {partial_path}")
92+
visit_index = windows_path.split("\\").index(environment.visit)
93+
partial_path = "/".join(windows_path.split("\\")[visit_index + 1 :])
94+
logger.info("Partial Linux path successfully constructed from Windows path")
10495

10596
logger.info(
10697
f"Looking for atlas XML file in metadata directory {str((source_visit_dir / partial_path).parent)}"

src/murfey/client/multigrid_control.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -566,15 +566,12 @@ def _start_dc(self, metadata_json):
566566
+ "/".join(source.parts[-2:])
567567
)
568568
metadata_source = Path(metadata_source_as_str.replace("//", "/"))
569-
try:
570-
ensure_dcg_exists(
571-
collection_type="spa",
572-
metadata_source=metadata_source,
573-
environment=self._environment,
574-
token=self.token,
575-
)
576-
except Exception as e:
577-
log.error(f"Failed to register data collection group: {e}")
569+
ensure_dcg_exists(
570+
collection_type="spa",
571+
metadata_source=metadata_source,
572+
environment=self._environment,
573+
token=self.token,
574+
)
578575
data = {
579576
"voltage": metadata_json["voltage"],
580577
"pixel_size_on_image": metadata_json["pixel_size_on_image"],

0 commit comments

Comments
 (0)