Skip to content

Commit 2680cc8

Browse files
committed
Merge branch '2204-alert-if-script' into release/0.15.0-rc2
2 parents 9aa8242 + f1d4a84 commit 2680cc8

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

sherlock_project/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
66
"""
77

8+
# This variable is only used to check for ImportErrors induced by users running as script rather than as module or package
9+
import_error_test_var = None
10+
811
__shortname__ = "Sherlock"
912
__longname__ = "Sherlock: Find Usernames Across Social Networks"
1013
__version__ = "0.14.4"

sherlock_project/sherlock.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,20 @@
77
networks.
88
"""
99

10+
import sys
11+
12+
try:
13+
from sherlock.__init__ import import_error_test_var # noqa: F401
14+
except ImportError:
15+
print("Did you run Sherlock with `python3 sherlock/sherlock.py ...`?")
16+
print("This is an outdated method. Please see https://sherlockproject.xyz/installation for up to date instructions.")
17+
sys.exit(1)
18+
1019
import csv
1120
import signal
1221
import pandas as pd
1322
import os
1423
import re
15-
import sys
1624
from argparse import ArgumentParser, RawDescriptionHelpFormatter
1725
from time import monotonic
1826

0 commit comments

Comments
 (0)