def perspective_persist(self, profile='jcli-prod'):
        path = '%s/%s.smppccs' % (self.config.store_path, profile)
        self.log.info('Persisting current configuration to [%s] profile in %s', profile, path)

        try:
            # Prepare connectors for persistence
            # Will persist config and service status only
            connectors = []
            for c in self.connectors:
                connectors.append({
                    'id': c['id'],
                    'config': c['config'],
                    'service_status':c['service'].running})

            # Write configuration with datetime stamp
            fh = open(path, 'w')
            fh.write('Persisted on %s [Jasmin %s]\n' % (time.strftime("%c"), jasmin.get_release()))
            fh.write(pickle.dumps(connectors, self.pickleProtocol))
            fh.close()

            # Set persistance state to True
            self.persisted = True
        except __HOLE__:
            self.log.error('Cannot persist to %s', path)
            return False
        except Exception, e:
            self.log.error('Unknown error occurred while persisting configuration: %s', e)
            return False

        return True
dataset/ETHPy150Open jookies/jasmin/jasmin/managers/clients.py/SMPPClientManagerPB.perspective_persist