The FieldInfo() object seems to me to be more appropriate than the FieldMappings if you want to drop fields from your input. It allows you to modify some properties of your input fields when passing them to the output. One of these properties is visibility (if a field is not visible, it won't be passed to the output). It is used among other by the Make Feature Layer tool. I would copy your input to a feature layer with a FieldInfo specifying which fields have to be kept (visible) or notdropped (hidden), and then use Feature Class to Feature Class without FieldMappings:
def subset_attributes(origFC, fieldList, outFC):
# List input fields
fields= arcpy.ListFields(origFC)
# Create a fieldinfo objects
fieldinfo = arcpy.FieldInfo()
# Iterate over input fields, add them to the FieldInfo and makehide them visibleif
# if they arearen't in the list of fields to be kept, hide them otherwise
for field in fields:
if not field.name in fieldList:
fieldinfo.addField(field.name, field.name, "VISIBLE", "")
else:
fieldinfo.addField(field.name, field.name, "HIDDEN", "")
# Copy features to a layer using the FieldInfo
arcpy.MakeFeatureLayer_management(origFC, "temp", "", "", fieldinfo)
# Export the layer to a feature class
arcpy.FeatureClassToFeatureClass_conversion("temp", scratchWS, outFC)
This code will work even if you drop all atrributes from the input.