def _push_status(data, item):
 status = item['status'].lower()
 if ('id' in item):
  if (('already pushed' in status) or ('already exists' in status)):
   already_pushed = data.setdefault('Layers', {}).setdefault('Already_Pushed', [])
   already_pushed.append(item['id'])
  elif (('successfully pushed' in status) or (status == 'pushed')):
   pushed = data.setdefault('Layers', {}).setdefault('Pushed', [])
   pushed.append(item['id'])

def _push_status ( data , item ) : status = item [ 'status' ] . lower ( ) if ( 'id' in item ) : if ( ( 'already pushed' in status ) or ( 'already exists' in status ) ) : already_pushed = data . setdefault ( 'Layers' , { } ) . setdefault ( 'Already_Pushed' , [ ] ) already_pushed . append ( item [ 'id' ] ) elif ( ( 'successfully pushed' in status ) or ( status == 'pushed' ) ) : pushed = data . setdefault ( 'Layers' , { } ) . setdefault ( 'Pushed' , [ ] ) pushed . append ( item [ 'id' ] )
process a status update from a docker push .