Skip to content

Commit ed92fc8

Browse files
committed
Add specific check for python 3+.
Inspired by comment by wookayin in JoshData#12.
1 parent f095212 commit ed92fc8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pdf_diff/command_line.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#!/usr/bin/python3
22

3-
import sys, json, subprocess, io, os
3+
import sys
4+
5+
if sys.version_info[0] < 3:
6+
print("ERROR: Python version 3+ is required.")
7+
sys.exit(1)
8+
9+
import json, subprocess, io, os
410
from lxml import etree
511
from PIL import Image, ImageDraw, ImageOps
612

0 commit comments

Comments
 (0)