summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server
diff options
context:
space:
mode:
authorJason Kincl <kincljc@ornl.gov>2013-06-14 14:02:48 -0400
committerJason Kincl <kincljc@ornl.gov>2013-06-17 10:14:56 -0400
commit9b7317bb94dec3235207598f85f34b1c01cae4f4 (patch)
tree82d66dd2bc0b02188f4700b58dccaeb9cdca5722 /src/lib/Bcfg2/Server
parent06b398542a5bf4a073f407a0fe96b5fed8d8a90a (diff)
downloadbcfg2-9b7317bb94dec3235207598f85f34b1c01cae4f4.tar.gz
bcfg2-9b7317bb94dec3235207598f85f34b1c01cae4f4.tar.bz2
bcfg2-9b7317bb94dec3235207598f85f34b1c01cae4f4.zip
Probes: Fixing Django exception import
Diffstat (limited to 'src/lib/Bcfg2/Server')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Probes.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Probes.py b/src/lib/Bcfg2/Server/Plugins/Probes.py
index 8937e4740..0974184b4 100644
--- a/src/lib/Bcfg2/Server/Plugins/Probes.py
+++ b/src/lib/Bcfg2/Server/Plugins/Probes.py
@@ -12,6 +12,7 @@ import Bcfg2.Server.Plugin
try:
from django.db import models
+ from django.core.exceptions import MultipleObjectsReturned
HAS_DJANGO = True
class ProbesDataModel(models.Model,
@@ -255,7 +256,7 @@ class Probes(Bcfg2.Server.Plugin.Probing,
ProbesGroupsModel.objects.get_or_create(
hostname=client.hostname,
group=group)
- except ProbesGroupsModel.MultipleObjectsReturned:
+ except MultipleObjectsReturned:
ProbesGroupsModel.objects.filter(hostname=client.hostname,
group=group).delete()
ProbesGroupsModel.objects.get_or_create(