git://git.onelab.eu
/
util-vserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
519e240
)
Make sure the configuration directory exists and that it's usable
author
Daniel Hokka Zakrisson
<dhokka@cs.princeton.edu>
Wed, 1 Aug 2007 18:33:28 +0000
(18:33 +0000)
committer
Daniel Hokka Zakrisson
<dhokka@cs.princeton.edu>
Wed, 1 Aug 2007 18:33:28 +0000
(18:33 +0000)
python/vserver.py
patch
|
blob
|
history
diff --git
a/python/vserver.py
b/python/vserver.py
index
cfd347c
..
93a22a2
100644
(file)
--- a/
python/vserver.py
+++ b/
python/vserver.py
@@
-1,6
+1,6
@@
# Copyright 2005 Princeton University
-#$Id: vserver.py,v 1.6
7 2007/07/31 18:14:02
dhozac Exp $
+#$Id: vserver.py,v 1.6
8 2007/07/31 22:04:24
dhozac Exp $
import errno
import fcntl
@@
-61,6
+61,9
@@
class VServerConfig:
def __init__(self, name, directory):
self.name = name
self.dir = directory
+ if not (os.path.isdir(self.dir) and
+ os.access(self.dir, os.R_OK | os.W_OK | os.X_OK):
+ raise NoSuchVServer, "%s does not exist" % self.dir
def get(self, option, default = None):
try: