diff options
author | Michael E Brown <mebrown@michaels-house.net> | 2008-03-07 21:15:44 -0600 |
---|---|---|
committer | Michael E Brown <mebrown@michaels-house.net> | 2008-03-07 21:15:44 -0600 |
commit | 94d02f3cf940d0e9e1f23ec0e8845f33105fc8fc (patch) | |
tree | 2e91e24f8c7e333f0c7839c2cde100552e275675 /py | |
parent | 4209ee74efad6c9554ffb22e18c27f19bf9b793b (diff) | |
download | mock-94d02f3cf940d0e9e1f23ec0e8845f33105fc8fc.tar.gz mock-94d02f3cf940d0e9e1f23ec0e8845f33105fc8fc.tar.xz mock-94d02f3cf940d0e9e1f23ec0e8845f33105fc8fc.zip |
handle idiots with grace and poise.
Diffstat (limited to 'py')
-rwxr-xr-x | py/mock.py | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -637,6 +637,17 @@ if __name__ == '__main__': except (SystemExit,): raise + except (OSError,), e: + if e.errno == 1: + print + log.error("%s" % str(e)) + print + log.error("The most common cause for this error is trying to run /usr/sbin/mock as an unprivileged user.") + log.error("Check your path to make sure that /usr/bin/ is listed before /usr/sbin, or manually run /usr/bin/mock to see if that fixes this problem.") + print + else: + raise + except (KeyboardInterrupt,): exitStatus = 7 log.error("Exiting on user interrupt, <CTRL>-C") |