mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
Catch import errors for modules that are not part of python.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23427 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
99e492ef08
commit
1121206ea7
1 changed files with 14 additions and 2 deletions
|
|
@ -42,12 +42,24 @@ import zipfile
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import getopt
|
import getopt
|
||||||
import which
|
|
||||||
import time
|
import time
|
||||||
import hashlib
|
import hashlib
|
||||||
import pysvn
|
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
|
# modules that are not part of python itself.
|
||||||
|
try:
|
||||||
|
import pysvn
|
||||||
|
except ImportError:
|
||||||
|
print "Fatal: This script requires the pysvn package to run."
|
||||||
|
print " See http://pysvn.tigris.org/."
|
||||||
|
sys.exit(-5)
|
||||||
|
try:
|
||||||
|
import which
|
||||||
|
except ImportError:
|
||||||
|
print "Fatal: This script requires the which package to run."
|
||||||
|
print " See http://code.google.com/p/which/."
|
||||||
|
sys.exit(-5)
|
||||||
|
|
||||||
# == Global stuff ==
|
# == Global stuff ==
|
||||||
# Windows nees some special treatment. Differentiate between program name
|
# Windows nees some special treatment. Differentiate between program name
|
||||||
# and executable filename.
|
# and executable filename.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue