Skip to content

Commit

Permalink
Merge pull request #1014 from Johann-PLW/main
Browse files Browse the repository at this point in the history
Rename does_view_exist to does_view_exist_in_db
  • Loading branch information
Johann-PLW authored Jan 9, 2025
2 parents 2cd3b16 + 6b5fb07 commit 3cc8a13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scripts/artifacts/FacebookMessenger.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from os.path import basename

from scripts.artifact_report import ArtifactHtmlReport
from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows, get_next_unused_name, open_sqlite_db_readonly, does_table_exist_in_db, does_view_exist
from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows, get_next_unused_name, open_sqlite_db_readonly, does_table_exist_in_db, does_view_exist_in_db

def get_FacebookMessenger(files_found, report_folder, seeker, wrap_text, timezone_offset):

Expand All @@ -13,7 +13,7 @@ def get_FacebookMessenger(files_found, report_folder, seeker, wrap_text, timezon
if file_found.endswith('.db'):

db = open_sqlite_db_readonly(file_found)
check = does_view_exist(db, 'thread_messages')
check = does_view_exist_in_db(db, 'thread_messages')

db = open_sqlite_db_readonly(file_found)

Expand Down
2 changes: 1 addition & 1 deletion scripts/ilapfuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ def does_table_exist_in_db(path, table_name):
logfunc(f"Query error, query={query} Error={str(ex)}")
return False

def does_view_exist(db, table_name):
def does_view_exist_in_db(db, table_name):
'''Checks if a table with specified name exists in an sqlite db'''
try:
query = f"SELECT name FROM sqlite_master WHERE type='view' AND name='{table_name}'"
Expand Down

0 comments on commit 3cc8a13

Please sign in to comment.