Commit 643384a2 authored by Timothy Stack's avatar Timothy Stack

Catch and ignore OSError thrown by os.listdir() when adding dev trees

to the list of ALLOWED_PATHS.
parent f486abd8
...@@ -269,7 +269,7 @@ class MyServer(SSL.ForkingSSLServer, SimpleXMLRPCDispatcher): ...@@ -269,7 +269,7 @@ class MyServer(SSL.ForkingSSLServer, SimpleXMLRPCDispatcher):
pass pass
return result return result
# #
# Flip to the user that is in the certificate. # Flip to the user that is in the certificate.
# #
...@@ -295,8 +295,13 @@ class MyServer(SSL.ForkingSSLServer, SimpleXMLRPCDispatcher): ...@@ -295,8 +295,13 @@ class MyServer(SSL.ForkingSSLServer, SimpleXMLRPCDispatcher):
self.admin = self.isadminuser(self.user) self.admin = self.isadminuser(self.user)
if self.admin: if self.admin:
ALLOWED_PATHS.extend(map(lambda x: os.path.join(STD_DEVEL_PATH, x), try:
os.listdir(STD_DEVEL_PATH))) ALLOWED_PATHS.extend(map(lambda x:
os.path.join(STD_DEVEL_PATH, x),
os.listdir(STD_DEVEL_PATH)))
pass
except OSError:
pass
pass pass
self.glist = self.getusergroups(self.user); self.glist = self.getusergroups(self.user);
......
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