class LicenseError(Exception):
pass
import arcview
import arcpy
try:
if arcpy.CheckExtension("Business") == "Available":
arcpy.CheckOutExtension("Business")
else:
raise LicenseError
arcpy.CheckInExtension("Business")
except LicenseError:
print "Business Analyst license is unavailable"
except:
print arcpy.GetMessages(2)
...Basically replacing "Business" with "BusinessPrem"