Browse Source

pretty warning when missing distutils

Nick Sweeting 6 years ago
parent
commit
5e583573d5
1 changed files with 5 additions and 1 deletions
  1. 5 1
      archivebox/index.py

+ 5 - 1
archivebox/index.py

@@ -3,7 +3,11 @@ import json
 
 
 from datetime import datetime
 from datetime import datetime
 from string import Template
 from string import Template
-from distutils.dir_util import copy_tree
+try:
+    from distutils.dir_util import copy_tree
+except ImportError:
+    print('[X] Missing "distutils" python package. To install it, run:')
+    print('    pip install distutils')
 
 
 from config import (
 from config import (
     OUTPUT_DIR,
     OUTPUT_DIR,