aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/wic12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/wic b/scripts/wic
index 425b665861..a7221c3610 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -31,11 +31,23 @@
__version__ = "0.1.0"
+# Python Standard Library modules
import os
import sys
import optparse
import logging
+# External modules
+try:
+ import rpm
+ import urlgrabber
+except ImportError:
+ print("ERROR: failed to import necessary modules.")
+ print("Please ensure the following modules are installed:")
+ print("\trpm");
+ print("\turlgrabber");
+ sys.exit(1)
+
scripts_path = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0])))
lib_path = scripts_path + '/lib'
sys.path = sys.path + [lib_path]