Skip to content

Commit

Permalink
Except ImportErrors induced by legacy run method
Browse files Browse the repository at this point in the history
  • Loading branch information
ppfeister committed Jul 1, 2024
1 parent 501cb3d commit 0ece8bf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions sherlock/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"""

# This variable is only used to check for ImportErrors induced by users running as script rather than as module or package
importErrTestVar = None

__shortname__ = "Sherlock"
__longname__ = "Sherlock: Find Usernames Across Social Networks"
__version__ = "0.14.4"
11 changes: 10 additions & 1 deletion sherlock/sherlock.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@
networks.
"""

import sys

try:
from sherlock.__init__ import importErrTestVar # noqa: F401
except ImportError:
print("Did you run Sherlock with `python3 sherlock/sherlock.py ...`?")
print("This is an outdated method. Please see https://sherlockproject.xyz/installation for up to date instructions.")
print("Most users can simply run `pipx install sherlock-project`, but other options are detailed on the website.")
sys.exit(1)

import csv
import signal
import pandas as pd
import os
import re
import sys
from argparse import ArgumentParser, RawDescriptionHelpFormatter
from time import monotonic

Expand Down

0 comments on commit 0ece8bf

Please sign in to comment.