Skip to content

Commit 6a77223

Browse files
committed
Handle missing iterm2 module in it2api better. Issue 11392
1 parent 4179344 commit 6a77223

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

utilities/it2api

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33
import argparse
44
import asyncio
5-
import iterm2
5+
try:
6+
import iterm2
7+
except ModuleNotFoundError:
8+
print("The current version of Python doesn't have the 'iterm2' module installed. Please run:")
9+
print("\n $ python3 -m pip install iterm2\n")
10+
exit()
611
import logging
712
import re
813
import sys

0 commit comments

Comments
 (0)