summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Admin/Pull.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/Server/Admin/Pull.py b/src/lib/Server/Admin/Pull.py
index 51672c912..81ae9c433 100644
--- a/src/lib/Server/Admin/Pull.py
+++ b/src/lib/Server/Admin/Pull.py
@@ -58,7 +58,12 @@ class Pull(Bcfg2.Server.Admin.MetadataCore):
print "Pull Source failure; could not fetch current state"
raise SystemExit(1)
- data = {'owner':owner, 'group':group, 'perms':perms, 'text':contents}
+ try:
+ data = {'owner':owner, 'group':group, 'perms':perms, 'text':contents}
+ except UnboundLocalError:
+ print("Unable to build entry. "
+ "Do you have a statistics plugin enabled?")
+ raise SystemExit(1)
for k, v in data.iteritems():
if v:
new_entry[k] = v