How to get reference to object(s) added by an operator?
Objects constructed with bpy.ops.mesh.primitive_* are automatically active. If there's no selection-changing operations immediately after object creation, you can access it through bpy.context.active_object or bpy.context.object.