Mercurial > ~astiob > upreckon > hgweb
comparison upreckon/files.py @ 245:6dd29475ae9b
Removed useless conditions in files.File._realize_path
author | Oleg Oshmyan <chortos@inbox.lv> |
---|---|
date | Wed, 02 Oct 2013 23:32:37 +0300 |
parents | 67fd512bb54a |
children | f5847d29e838 |
comparison
equal
deleted
inserted
replaced
244:67fd512bb54a | 245:6dd29475ae9b |
---|---|
277 if allow_root or self._has_tests or self.archive: | 277 if allow_root or self._has_tests or self.archive: |
278 return self | 278 return self |
279 return None | 279 return None |
280 cand = (self + virtpath[0])._realize_path(virtpath[1:], allow_root) | 280 cand = (self + virtpath[0])._realize_path(virtpath[1:], allow_root) |
281 if cand: return cand | 281 if cand: return cand |
282 if not cand and not self._has_tests: | 282 if not self._has_tests: |
283 for metafile in self._add_tests(): | 283 for metafile in self._add_tests(): |
284 cand = metafile._realize_path(virtpath, allow_root) | 284 cand = metafile._realize_path(virtpath, allow_root) |
285 if cand: return cand | 285 if cand: return cand |
286 if not cand and len(virtpath) > 1: | 286 if len(virtpath) > 1: |
287 metafile = self._add_virtual(virtpath[0]) | 287 metafile = self._add_virtual(virtpath[0]) |
288 cand = metafile._realize_path(virtpath[1:], allow_root) | 288 cand = metafile._realize_path(virtpath[1:], allow_root) |
289 if cand: return cand | 289 if cand: return cand |
290 | 290 |
291 def _add_tests(self): | 291 def _add_tests(self): |