def handle(self, *args, **options):
<EOL>self.verbosity = int(options.get('<STR_LIT>'))<EOL>self.stdout.write('<STR_LIT:\r\n>')<EOL>layers = self.retrieve_layers(*args, **options)<EOL>if len(layers) < <NUM_LIT:1>:<EOL><INDENT>self.stdout.write('<STR_LIT>')<EOL>return<EOL><DEDENT>else:<EOL><INDENT>self.verbose('<STR_LIT>' % len(layers))<EOL><DEDENT>for layer in layers:<EOL><INDENT>try:<EOL><INDENT>synchronizer_path = layer.external.synchronizer_path<EOL><DEDENT>except (ObjectDoesNotExist, AttributeError):<EOL><INDENT>self.stdout.write('<STR_LIT>' % layer.name)<EOL>continue<EOL><DEDENT>if synchronizer_path == '<STR_LIT:None>':<EOL><INDENT>self.stdout.write('<STR_LIT>' % layer.name)<EOL>continue<EOL><DEDENT>if layer.external.config is None:<EOL><INDENT>self.stdout.write('<STR_LIT>' % layer.name)<EOL>continue<EOL><DEDENT>synchronizer = import_by_path(synchronizer_path)<EOL>self.stdout.write('<STR_LIT>' % synchronizer.__name__)<EOL>try:<EOL><INDENT>instance = synchronizer(layer, verbosity=self.verbosity)<EOL>self.stdout.write('<STR_LIT>' % layer.slug)<EOL>messages = instance.sync()<EOL><DEDENT>except ImproperlyConfigured as e:<EOL><INDENT>self.stdout.write('<STR_LIT>' % e)<EOL>continue<EOL><DEDENT>except Exception as e:<EOL><INDENT>self.stdout.write('<STR_LIT>' % e)<EOL>exception(e)<EOL>continue<EOL><DEDENT>for message in messages:<EOL><INDENT>self.stdout.write('<STR_LIT>' % message)<EOL><DEDENT><DEDENT>self.stdout.write('<STR_LIT:\r\n>')<EOL>
execute sync command