Esempio n. 1
0
    def __call__(self, location: Location, system_context: SystemContext,
                 *args: typing.Any, **kwargs: typing.Any) -> None:
        """Execute command."""
        file_name = args[0]
        to_write = system_context.substitute(args[1]).encode("utf-8")

        create_file(system_context, file_name, to_write, **kwargs)
Esempio n. 2
0
 def __call__(self, location: Location, system_context: SystemContext,
              *args: typing.Any, **kwargs: typing.Any) -> None:
     """Execute command."""
     to_write = system_context.substitute(args[1]).encode('utf-8')
     append_file(system_context, args[0], to_write, **kwargs)