Skip to content

Commit

Permalink
ISPyB LIMS: raise NotImplementedError
Browse files Browse the repository at this point in the history
Reise the dedicated 'NotImplementedError' exception if an
'abstract' method is invoked in ISPyBAbstractLIMS class.

This is the established way to deal with 'abstart' method in python.
  • Loading branch information
elmjag authored and marcus-oscarsson committed Jan 31, 2025
1 parent bfd38cd commit 325f3bc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mxcubecore/HardwareObjects/abstract/ISPyBAbstractLims.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ def init(self):
pass

def get_user_name(self):
raise Exception("Abstract class. Not implemented")
raise NotImplementedError

def get_full_user_name(self):
raise Exception("Abstract class. Not implemented")
raise NotImplementedError

def is_user_login_type(self):
raise Exception("Abstract class. Not implemented")
raise NotImplementedError

def store_beamline_setup(self, session_id, bl_config):
self.adapter.store_beamline_setup(session_id, bl_config)
Expand Down Expand Up @@ -130,7 +130,7 @@ def ldap_login(self, login_name, psd):
return self.ldapConnection.authenticate(login_name, psd)

def ispyb_login(self, login_name, psd):
raise Exception("Abstract class. Not implemented")
raise NotImplementedError

def store_data_collection(self, mx_collection, bl_config=None):
return self._store_data_collection(mx_collection, bl_config)
Expand Down

0 comments on commit 325f3bc

Please sign in to comment.