##// END OF EJS Templates
define `__file__` in config files
MinRK -
Show More
@@ -321,7 +321,11 b' class PyFileConfigLoader(FileConfigLoader):'
321 def get_config():
321 def get_config():
322 return self.config
322 return self.config
323
323
324 namespace = dict(load_subconfig=load_subconfig, get_config=get_config)
324 namespace = dict(
325 load_subconfig=load_subconfig,
326 get_config=get_config,
327 __file__=self.full_filename,
328 )
325 fs_encoding = sys.getfilesystemencoding() or 'ascii'
329 fs_encoding = sys.getfilesystemencoding() or 'ascii'
326 conf_filename = self.full_filename.encode(fs_encoding)
330 conf_filename = self.full_filename.encode(fs_encoding)
327 py3compat.execfile(conf_filename, namespace)
331 py3compat.execfile(conf_filename, namespace)
General Comments 0
You need to be logged in to leave comments. Login now