The ornamental design for an enclosure for a generator, as shown and described.
FIG. 1 is a front left perspective view of an enclosure for a generator showing our new design;
FIG. 2 is a front left perspective view thereof, shown in an open condition;
FIG. 3 is a right side elevation view thereof;
FIG. 4 is a rear view thereof;
FIG. 5 is a left side elevation view thereof;
FIG. 6 is a front view thereof; and,
FIG. 7 is a top plan view thereof.
The broken lines shown represent unclaimed subject matter and form no part of the claim design. The uneven broken lines shown in FIG. 2 define the boundary of the interior of the enclosure for a generator and form no part of the claimed design.