Skip to content

Commit

Permalink
[SC] - Raising error when trying to call mount and sample changer is …
Browse files Browse the repository at this point in the history
…BUSY
  • Loading branch information
marcus-oscarsson committed Jan 31, 2025
1 parent 18270c7 commit 4e31616
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mxcubeweb/core/components/samplechanger.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,13 @@ def unmount_sample_clean_up(self, sample):

def mount_sample(self, sample):
gevent.spawn(self.mount_sample_clean_up, sample)
sc = HWR.beamline.sample_changer

if not sc.is_ready():
raise Exception("Sample changer is busy, the sample can not be loaded.")
else:
gevent.spawn(self.mount_sample_clean_up, sample)

return self.get_sc_contents()

def unmount_sample(self, sample):
Expand Down

0 comments on commit 4e31616

Please sign in to comment.