only check rc value, not exit bits

This commit is contained in:
Jude Nelson
2017-10-11 17:26:25 -04:00
parent 29b4e5d94b
commit 8cd29bb2d1

View File

@@ -232,7 +232,7 @@ def sqlite3_backup( src_path, dest_path ):
out, err = p.communicate()
rc = p.wait()
if os.WIFEXITED(rc) and os.WEXITSTATUS(rc) != 0 and ("database is locked" in out.lower() or "database is locked" in err.lower()):
if rc != 0 and ("database is locked" in out.lower() or "database is locked" in err.lower()):
# try again
log.error("Database {} is locked; trying again in {} seconds".format(src_path, backoff))
time.sleep(backoff)