summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2013-03-22 17:11:12 -0500
committerSol Jerome <sol.jerome@gmail.com>2013-03-22 17:11:12 -0500
commit5c83a40c5be862fef68d13179652e479f73b4560 (patch)
tree516db6e51323a977200c5a4841b48c3a23892a6d /tools
parentf113d90043b4844abb8a3ba3fdd325254281d048 (diff)
downloadbcfg2-5c83a40c5be862fef68d13179652e479f73b4560.tar.gz
bcfg2-5c83a40c5be862fef68d13179652e479f73b4560.tar.bz2
bcfg2-5c83a40c5be862fef68d13179652e479f73b4560.zip
migrate_dbstats: Fix traceback found by jonten
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/upgrade/1.3/migrate_dbstats.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/upgrade/1.3/migrate_dbstats.py b/tools/upgrade/1.3/migrate_dbstats.py
index 69d9514df..cbd2a6099 100755
--- a/tools/upgrade/1.3/migrate_dbstats.py
+++ b/tools/upgrade/1.3/migrate_dbstats.py
@@ -246,6 +246,9 @@ def _restructure():
failures = []
int_count = legacy_models.Interaction.objects.count()
+ if int_count == 0:
+ logger.error("Found no legacy interactions")
+ return False
int_ctr = 0
start_time = 0
for inter in BatchFetch(legacy_models.Interaction.objects.\