A shedding machine (2; 1002), of the rack or cam mechanism type, for a weaving machine, the machine comprising: - output levers (32; 1032) that each comprise a first flank (42; 1042), a second flank (40; 1040), a first edge (46; 1046) connecting the first flank to the second flank and a second edge (48; 1048) opposite the first edge and connecting the first flank to the second flank, - a shared shaft (10; 1010), on which the output levers are mounted, and defining a longitudinal axis (X10; X1010), - means (4, 8, 52; 1170, 1172, 1174) for driving the output levers in an alternating oscillating movement around the shared shaft (10; 1010), - an outer enclosure (12, 30; 1012, 1030), which is traversed by the output levers, - a frame (6, 1006), which defines, with the outer enclosure, an inner volume of the machine, and - at least one first sealing barrier (120; 1120) inserted between the outer enclosure and a first lever from among the output levers (32; 1032), the first sealing barrier (120; 1120) is in tight contact with the first lever over the entire periphery of the first lever and comprises: - a first radial portion (142; 1186), which is in tight contact with one from among the first edge (46; 1046) and the second edge (48; 1048) of the first lever, - a second radial portion (136; 1188) which is in tight contact with the second edge (48; 1048) of the first lever, - a first side portion (130; 1130), which is in tight contact with the first flank (42; 1042) of the first lever and which is arranged in the continuation of each of the two radial portions, and - a second side portion (132; 1132), which is in tight contact with the second flank (40; 1040) of the first lever, and which is arranged in the continuation of each of the two radial portions. and the first sealing barrier (120; 1120) is housed in the outer enclosure (12, 30), which is stationary relative to the frame of the machine when the output levers (32; 1032) are in alternating oscillating motion around the shared shaft (10; 1010), the first radial portion (142; 1186) of the first sealing barrier being in tight contact with a curved surface (56; 1056) of the first edge (46; 1046) and the second radial portion (136; 1188) of the first sealing barrier being in tight contact with a curved surface (58; 1058) of the second edge (48; 1048), each of the curved surfaces being with an arc of circle-shaped section coaxial to the longitudinal axis (X10, X1010) defined by the shared shaft (10; 1010). - output levers (32; 1032) that each comprise a first flank (42; 1042), a second flank (40; 1040), a first edge (46; 1046) connecting the first flank to the second flank and a second edge (48; 1048) opposite the first edge and connecting the first flank to the second flank, - a shared shaft (10; 1010), on which the output levers are mounted, and defining a longitudinal axis (X10; X1010), - means (4, 8, 52; 1170, 1172, 1174) for driving the output levers in an alternating oscillating movement around the shared shaft (10; 1010), - an outer enclosure (12, 30; 1012, 1030), which is traversed by the output levers, - a frame (6, 1006), which defines, with the outer enclosure, an inner volume of the machine, and - at least one first sealing barrier (120; 1120) inserted between the outer enclosure and a first lever from among the output levers (32; 1032), - a first radial portion (142; 1186), which is in tight contact with one from among the first edge (46; 1046) and the second edge (48; 1048) of the first lever, - a second radial portion (136; 1188) which is in tight contact with the second edge (48; 1048) of the first lever, - a first side portion (130; 1130), which is in tight contact with the first flank (42; 1042) of the first lever and which is arranged in the continuation of each of the two radial portions, and - a second side portion (132; 1132), which is in tight contact with the second flank (40; 1040) of the first lever, and which is arranged in the continuation of each of the two radial portions.