<s> from core . models import Slice , SliceDeployments , User <EOL> from synchronizers . base . deleter import Deleter <EOL> from synchronizers . base . deleters . slice_deployment_deleter import SliceDeploymentsDeleter <EOL> from xos . logger import Logger , logging <EOL> logger = Logger ( level = logging . INFO ) <EOL> class SliceDeleter ( Deleter ) : <EOL> model = '<STR_LIT>' <EOL> def call ( self , pk ) : <EOL> slice = Slice . objects . get ( pk = pk ) <EOL> slice_deployment_deleter = SliceDeploymentsDeleter ( ) <EOL> for slice_deployment in SliceDeployments . objects . filter ( slice = slice ) : <EOL> try : <EOL> slice_deployment_deleter ( slice_deployment . id ) <EOL> except : <EOL> logger . log_exc ( "<STR_LIT>" % slice_deployment , extra = slice . tologdict ( ) ) <EOL> slice . delete ( ) </s>
