move data access to inside the try
This commit is contained in:
parent
3591d085af
commit
b923eed55d
1 changed files with 3 additions and 5 deletions
|
@ -91,16 +91,14 @@ class LibrarySync(threading.Thread):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
results = du.downloadUrl(url)
|
results = du.downloadUrl(url)
|
||||||
|
changedItems = results["ItemsUpdated"] + results["ItemsAdded"]
|
||||||
|
removedItems = results["ItemsRemoved"]
|
||||||
|
userChanges = results["UserDataChanged"]
|
||||||
except:
|
except:
|
||||||
utils.logMsg("Sync Database", "Incremental Sync Get Changes Failed", 0)
|
utils.logMsg("Sync Database", "Incremental Sync Get Changes Failed", 0)
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
utils.logMsg("Sync Database", "Incremental Sync Changes : " + str(results), 0)
|
utils.logMsg("Sync Database", "Incremental Sync Changes : " + str(results), 0)
|
||||||
|
|
||||||
changedItems = results["ItemsUpdated"] + results["ItemsAdded"]
|
|
||||||
removedItems = results["ItemsRemoved"]
|
|
||||||
userChanges = results["UserDataChanged"]
|
|
||||||
|
|
||||||
if(len(changedItems) < 1000 and len(removedItems) < 1000 and len(userChanges) < 1000):
|
if(len(changedItems) < 1000 and len(removedItems) < 1000 and len(userChanges) < 1000):
|
||||||
|
|
||||||
WINDOW.setProperty("startup", "done")
|
WINDOW.setProperty("startup", "done")
|
||||||
|
|
Loading…
Reference in a new issue