Skip to content
Permalink
Browse files

Properly count recovered records when recovering application_usage DB

  • Loading branch information...
gregneagle committed Feb 20, 2017
1 parent 4b4bbb8 commit fcdbdca9376c83ee5ca445d9ba64c6970d0b97bf
Showing with 2 additions and 1 deletion.
  1. +2 −1 code/client/munkilib/app_usage.py
@@ -28,6 +28,7 @@
import logging
import os
import sqlite3
import tempfile
import time

# our libs
@@ -297,11 +298,11 @@ def _recreate_database(self):

usage_db_tmp = '%s.tmp.%d' % (APPLICATION_USAGE_DB, os.getpid())

recovered = 0
try:
conn = self._connect(usage_db_tmp)
for table in tables:
conn.execute(table['create_sql'])
recovered = 0
for row in table['rows']:
if row[1] == '':
# skip rows with empty bundle_id or item_name

0 comments on commit fcdbdca

Please sign in to comment.
You can’t perform that action at this time.