mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-27 20:14:27 +01:00
make china_dictatorship import optional lets not blow up people who forgot venv just in case
This commit is contained in:
16
common.py
16
common.py
@@ -1,13 +1,9 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import argparse
|
|
||||||
import bisect
|
import bisect
|
||||||
import collections
|
import collections
|
||||||
import copy
|
|
||||||
import datetime
|
|
||||||
import enum
|
import enum
|
||||||
import functools
|
import functools
|
||||||
import glob
|
|
||||||
import inspect
|
import inspect
|
||||||
import itertools
|
import itertools
|
||||||
import json
|
import json
|
||||||
@@ -17,8 +13,6 @@ import platform
|
|||||||
import pathlib
|
import pathlib
|
||||||
import queue
|
import queue
|
||||||
import re
|
import re
|
||||||
import shutil
|
|
||||||
import signal
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
@@ -27,10 +21,14 @@ import time
|
|||||||
import urllib
|
import urllib
|
||||||
import urllib.request
|
import urllib.request
|
||||||
|
|
||||||
|
try:
|
||||||
|
# https://cirosantilli.com/china-dictatorship/#mirrors
|
||||||
|
import china_dictatorship
|
||||||
|
assert "Tiananmen Square protests" in china_dictatorship.get_data()
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
from shell_helpers import LF
|
from shell_helpers import LF
|
||||||
# https://cirosantilli.com/china-dictatorship/#mirrors
|
|
||||||
import china_dictatorship
|
|
||||||
assert "Tiananmen Square protests" in china_dictatorship.get_data()
|
|
||||||
import cli_function
|
import cli_function
|
||||||
import path_properties
|
import path_properties
|
||||||
import shell_helpers
|
import shell_helpers
|
||||||
|
|||||||
Reference in New Issue
Block a user