Commit 7efa4873 by willmcgugan@gmail.com

errno constants

parent 4e059083
...@@ -5,6 +5,7 @@ import sys ...@@ -5,6 +5,7 @@ import sys
from fs.opener import opener from fs.opener import opener
from fs.commands.runner import Command from fs.commands.runner import Command
from fs.utils import print_fs from fs.utils import print_fs
import errno
class FSServe(Command): class FSServe(Command):
...@@ -90,7 +91,7 @@ Serves the contents of PATH with one of a number of methods""" ...@@ -90,7 +91,7 @@ Serves the contents of PATH with one of a number of methods"""
self.error("Server type '%s' not recognised\n" % options.type) self.error("Server type '%s' not recognised\n" % options.type)
except IOError, e: except IOError, e:
if e.errno == 13: if e.errno == errno.EACCES:
self.error('Permission denied\n') self.error('Permission denied\n')
return 1 return 1
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment