summaryrefslogtreecommitdiffstats
path: root/tools/upgrade/1.3/migrate_dbstats.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-03-25 10:06:56 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-03-25 10:06:56 -0400
commitaacbd15de9d6985dba876337547d73fb4cabfacb (patch)
treec5ffc47a8d8a19078033728b98abbc3619c7fe99 /tools/upgrade/1.3/migrate_dbstats.py
parent6987584150cb9bcc8b178f1e714339f74669345b (diff)
parentfe7a3e9c7a7d66cccbd825465cefcf88165a0c3a (diff)
downloadbcfg2-aacbd15de9d6985dba876337547d73fb4cabfacb.tar.gz
bcfg2-aacbd15de9d6985dba876337547d73fb4cabfacb.tar.bz2
bcfg2-aacbd15de9d6985dba876337547d73fb4cabfacb.zip
Merge branch 'maint'
Diffstat (limited to 'tools/upgrade/1.3/migrate_dbstats.py')
-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.\