Mercurial > ~astiob > upreckon > hgweb
diff upreckon/config.py @ 208:ede78fbd509a
Revamped files.File
This changes (simplifies) file search path:
* when searching for testconf, .../testconf.py is now given precendence
over .../tests/testconf.py;
* when searching inside archives, a/tests/b/c is now given precedence
over a/c.
author | Oleg Oshmyan <chortos@inbox.lv> |
---|---|
date | Thu, 18 Aug 2011 02:20:24 +0300 |
parents | 946e8c09ba12 |
children | d66d5823bb1a |
line wrap: on
line diff
--- a/upreckon/config.py Thu Aug 18 01:19:15 2011 +0300 +++ b/upreckon/config.py Thu Aug 18 02:20:24 2011 +0300 @@ -114,7 +114,7 @@ sys.dont_write_bytecode = True except AttributeError: pass - metafile = files.File(problem_name + '/testconf.py', True, 'configuration') + metafile = files.File.from_virtual_path(problem_name + '/testconf.py', True, 'configuration') module = None with CompatBuiltins() as builtins: if zipimport and isinstance(metafile.archive, files.ZipArchive): @@ -225,7 +225,7 @@ sys.dont_write_bytecode = True except AttributeError: pass - metafile = files.File('testconf.py', True, 'configuration') + metafile = files.File.from_virtual_path('testconf.py', True, 'configuration') module = None with CompatBuiltins() as builtins: if zipimport and isinstance(metafile.archive, files.ZipArchive):