1. A method for obtaining a leaktight electronic device, comprising:a) placing an electronic module inside a mold;
b) keeping said electronic module away from the walls of said mold with the aid of holding lugs that each have an end which protrudes toward the inside of the mold;
c) injecting into said mold a thermoplastic material designed to harden so as to form a leaktight shell, said holding lugs retracting toward the outside of the mold during the injection of said thermoplastic material,
wherein at least one electronic subassembly of the electronic module placed inside the mold in step a) is encapsulated in a flexible shell, and
wherein said flexible shell deforms while said thermoplastic material hardens.