summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcos <cos>2024-07-03 01:22:40 +0200
committercos <cos>2024-07-03 11:31:23 +0200
commitceda401ec7ddb035602b2e25b526d8e5f8047ff8 (patch)
tree21ee6dcc3f8a45ef5f884dbf20675b5f9bc6f325
parent530d003e1d9956de18ab42a607f37770b3467243 (diff)
downloadAntennaPodDbFixer-ceda401ec7ddb035602b2e25b526d8e5f8047ff8.zip
Always validate that databases match version
-rwxr-xr-xAntennaPodDbFixer.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/AntennaPodDbFixer.py b/AntennaPodDbFixer.py
index b506ba6..840ee03 100755
--- a/AntennaPodDbFixer.py
+++ b/AntennaPodDbFixer.py
@@ -45,15 +45,15 @@ else:
if not os.path.isfile(emptyFilePath):
print("If needed, you can download old app versions on F-Droid and export an empty database.")
emptyFilePath = input("Enter file path to an EMPTY AntennaPod database with the same version: ")
- emptyVersion = subprocess.run(
- ["sqlite3", emptyFilePath, "PRAGMA user_version;"],
- capture_output=True,
- text=True
- ).stdout.strip()
- print("Empty file version: " + emptyVersion)
- if corruptedVersion != emptyVersion:
- print("Error: Application version differs between database files.", file=sys.stderr)
- exit(1)
+emptyVersion = subprocess.run(
+ ["sqlite3", emptyFilePath, "PRAGMA user_version;"],
+ capture_output=True,
+ text=True
+ ).stdout.strip()
+print("Empty file version: " + emptyVersion)
+if corruptedVersion != emptyVersion:
+ print("Error: Application version differs between database files.", file=sys.stderr)
+ exit(1)
print()
repairedFilePath = inputFilePath + "-repaired.db"