aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-07-29 16:10:22 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-07-29 16:10:22 +1200
commitbc84cc99cdc6785f8e1f93113435914fc7a138f4 (patch)
tree57cc80ef76503a24425760dd5359a0f9bab0eb01
parent680801a47edd9cf26f1f1b798ed545d9eb875ff9 (diff)
downloadmitmproxy-bc84cc99cdc6785f8e1f93113435914fc7a138f4.tar.gz
mitmproxy-bc84cc99cdc6785f8e1f93113435914fc7a138f4.tar.bz2
mitmproxy-bc84cc99cdc6785f8e1f93113435914fc7a138f4.zip
Handle file access denied in pathod.
-rwxr-xr-xpathod5
1 files changed, 4 insertions, 1 deletions
diff --git a/pathod b/pathod
index 144e01b5..ba290dcf 100755
--- a/pathod
+++ b/pathod
@@ -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()