from django.core.exceptions import ObjectDoesNotExisttry: disabledusers.objects.get(sAMAccountName='liu')except ObjectDoesNotExist: print 'a'
except modelname.DoesNotExist:
本文共 234 字,大约阅读时间需要 1 分钟。
from django.core.exceptions import ObjectDoesNotExisttry: disabledusers.objects.get(sAMAccountName='liu')except ObjectDoesNotExist: print 'a'
except modelname.DoesNotExist:
转载于:https://www.cnblogs.com/dreamer-fish/p/5835465.html