|
|
@ -787,7 +787,7 @@ class Interpreter(): |
|
|
|
'vcs_tag' : self.func_vcs_tag, |
|
|
|
'vcs_tag' : self.func_vcs_tag, |
|
|
|
'set_variable' : self.func_set_variable, |
|
|
|
'set_variable' : self.func_set_variable, |
|
|
|
'import' : self.func_import, |
|
|
|
'import' : self.func_import, |
|
|
|
'file' : self.func_file, |
|
|
|
'files' : self.func_files, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
def module_method_callback(self, invalues): |
|
|
|
def module_method_callback(self, invalues): |
|
|
@ -890,12 +890,8 @@ class Interpreter(): |
|
|
|
|
|
|
|
|
|
|
|
@stringArgs |
|
|
|
@stringArgs |
|
|
|
@noKwargs |
|
|
|
@noKwargs |
|
|
|
def func_file(self, node, args, kwargs): |
|
|
|
def func_files(self, node, args, kwargs): |
|
|
|
if len(args) != 1: |
|
|
|
return [File.from_source_file(self.environment.source_dir, self.subdir, fname) for fname in args] |
|
|
|
raise InvalidCode('File takes one argument.') |
|
|
|
|
|
|
|
fname = args[0] |
|
|
|
|
|
|
|
fobj = File.from_source_file(self.environment.source_dir, self.subdir, fname) |
|
|
|
|
|
|
|
return fobj |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def set_variable(self, varname, variable): |
|
|
|
def set_variable(self, varname, variable): |
|
|
|
if variable is None: |
|
|
|
if variable is None: |
|
|
|