Revision 127266b4 lib/vcluster.py
b/lib/vcluster.py | ||
---|---|---|
111 | 111 |
(_ROOTDIR_ENVNAME, _HOSTNAME_ENVNAME)) |
112 | 112 |
|
113 | 113 |
if rootdir: |
114 |
assert rootdir == os.path.normpath(rootdir) |
|
114 |
assert rootdir == os.path.normpath(rootdir), "Not normalized: " + rootdir
|
|
115 | 115 |
|
116 | 116 |
_CheckHostname(hostname) |
117 | 117 |
|
... | ... | |
191 | 191 |
directory specified in the environment. |
192 | 192 |
|
193 | 193 |
""" |
194 |
assert os.path.isabs(path) |
|
194 |
assert os.path.isabs(path), "Path not absolute: " + path
|
|
195 | 195 |
|
196 | 196 |
if _noderoot: |
197 | 197 |
result = "%s/%s" % (_noderoot, path) |
198 | 198 |
else: |
199 | 199 |
result = path |
200 | 200 |
|
201 |
assert os.path.isabs(result) |
|
201 |
assert os.path.isabs(result), "Path not absolute: " + path
|
|
202 | 202 |
|
203 | 203 |
return os.path.normpath(result) |
204 | 204 |
|
... | ... | |
210 | 210 |
path. |
211 | 211 |
|
212 | 212 |
""" |
213 |
assert os.path.isabs(path) |
|
213 |
assert os.path.isabs(path), "Path not absolute: " + path
|
|
214 | 214 |
|
215 | 215 |
norm_path = os.path.normpath(path) |
216 | 216 |
|
... | ... | |
228 | 228 |
else: |
229 | 229 |
result = norm_path |
230 | 230 |
|
231 |
assert os.path.isabs(result) |
|
231 |
assert os.path.isabs(result), "Path not absolute: " + path
|
|
232 | 232 |
|
233 | 233 |
return result |
234 | 234 |
|
... | ... | |
241 | 241 |
undo the process. Virtual paths are meant to be transported via RPC. |
242 | 242 |
|
243 | 243 |
""" |
244 |
assert os.path.isabs(path) |
|
244 |
assert os.path.isabs(path), "Path not absolute: " + path
|
|
245 | 245 |
|
246 | 246 |
if _noderoot and path not in _VPATH_WHITELIST: |
247 | 247 |
return _VIRT_PATH_PREFIX + _RemoveNodePrefix(path, _noderoot=_noderoot) |
... | ... | |
257 | 257 |
Virtual paths are meant to be transported via RPC. |
258 | 258 |
|
259 | 259 |
""" |
260 |
assert os.path.isabs(path) |
|
260 |
assert os.path.isabs(path), "Path not absolute: " + path
|
|
261 | 261 |
|
262 | 262 |
if _noderoot and path not in _VPATH_WHITELIST: |
263 | 263 |
if path.startswith(_VIRT_PATH_PREFIX): |
Also available in: Unified diff