def catalogue_pre_save(instance, sender, **kwargs):
 record = None
 try:
  catalogue = get_catalogue()
  record = catalogue.get_record(instance.uuid)
 except EnvironmentError as err:
  msg = ('Could not connect to catalogue to save information for layer "%s"' % instance.name)
  LOGGER.warn(msg, err)
  raise err
 if (record is None):
  return

def catalogue_pre_save ( instance , sender , ** kwargs ) : record = None try : catalogue = get_catalogue ( ) record = catalogue . get_record ( instance . uuid ) except EnvironmentError as err : msg = ( 'Could not connect to catalogue to save information for layer "%s"' % instance . name ) LOGGER . warn ( msg , err ) raise err if ( record is None ) : return
send information to catalogue .