大家好,又见面了,我是你们的朋友全栈君。
from django.core.exceptions import ObjectDoesNotExist try: disabledusers.objects.get(sAMAccountName='liu') except ObjectDoesNotExist: print 'a'
except modelname.DoesNotExist:
转载于:https://www.cnblogs.com/dreamer-fish/p/5835465.html
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/126009.html原文链接:https://javaforall.net