I'm trying to find a way to determine whether a feature class is locked before trying to alter it.
In one database I want to remove a feature class completely, and in another I want to add extra fields. I can't do either if they're locked.
I was expecting to find something in arcpy.Describe()
but haven't found anything. Something like
if arcpy.Describe(myFC).isLocked:
print "Can't proceed - feature class is locked"
else:
arcpy.Delete_management(myFC)
Is there a way to check feature class locks using arcpy?