summaryrefslogtreecommitdiffstats
path: root/py
diff options
context:
space:
mode:
authorClark Williams <williams@redhat.com>2009-07-08 11:43:42 -0500
committerClark Williams <williams@redhat.com>2009-07-08 11:43:42 -0500
commitb9819b8f173d6e0cc2ac6c2e189691e1854ef2a8 (patch)
tree8578e4b3c0612f170f1a7a6f725486cbc1de305f /py
parentb4830cdc0facfdd1d678a16449a2e2c3120d8625 (diff)
downloadmock-b9819b8f173d6e0cc2ac6c2e189691e1854ef2a8.tar.gz
mock-b9819b8f173d6e0cc2ac6c2e189691e1854ef2a8.tar.xz
mock-b9819b8f173d6e0cc2ac6c2e189691e1854ef2a8.zip
added code to raise exception when --shell specified for uninitialized
chroot. BZ# 506288 Signed-off-by: Clark Williams <williams@redhat.com>
Diffstat (limited to 'py')
-rwxr-xr-xpy/mock.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/mock.py b/py/mock.py
index c5f057b..a09e6d8 100755
--- a/py/mock.py
+++ b/py/mock.py
@@ -566,6 +566,8 @@ def main(ret):
elif options.mode == 'shell':
chroot.tryLockBuildRoot()
+ if not os.path.exists(chroot.makeChrootPath()):
+ raise RuntimeError, "chroot %s not initialized!" % chroot.makeChrootPath()
try:
chroot._mountall()
cmd = ' '.join(args)