diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-07-29 16:10:22 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-07-29 16:10:22 +1200 |
commit | bc84cc99cdc6785f8e1f93113435914fc7a138f4 (patch) | |
tree | 57cc80ef76503a24425760dd5359a0f9bab0eb01 | |
parent | 680801a47edd9cf26f1f1b798ed545d9eb875ff9 (diff) | |
download | mitmproxy-bc84cc99cdc6785f8e1f93113435914fc7a138f4.tar.gz mitmproxy-bc84cc99cdc6785f8e1f93113435914fc7a138f4.tar.bz2 mitmproxy-bc84cc99cdc6785f8e1f93113435914fc7a138f4.zip |
Handle file access denied in pathod.
-rwxr-xr-x | pathod | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,6 +1,6 @@ #!/usr/bin/env python import argparse, sys, logging, logging.handlers -from libpathod import pathod, utils, version +from libpathod import pathod, utils, version, rparse if __name__ == "__main__": parser = argparse.ArgumentParser(description='A pathological HTTP/S daemon.') @@ -117,6 +117,9 @@ if __name__ == "__main__": ) except pathod.PathodError, v: parser.error(str(v)) + except rparse.FileAccessDenied, v: + parser.error("%s You probably want to a -d argument."%str(v)) + try: print "%s listening on port %s"%(version.NAMEVERSION, pd.port) pd.serve_forever() |