(self)
| 786 | del cls.opts |
| 787 | |
| 788 | def update_module(self): |
| 789 | with salt.utils.files.fopen(self.module_path, "wb") as fh: |
| 790 | fh.write(salt.utils.stringutils.to_bytes(virtual_alias_module_template)) |
| 791 | fh.flush() |
| 792 | os.fsync(fh.fileno()) # flush to disk |
| 793 | |
| 794 | # pyc files don't like it when we change the original quickly |
| 795 | # since the header bytes only contain the timestamp (granularity of seconds) |
| 796 | # TODO: don't write them? Is *much* slower on re-load (~3x) |
| 797 | # https://docs.python.org/2/library/sys.html#sys.dont_write_bytecode |
| 798 | remove_bytecode(self.module_path) |
| 799 | |
| 800 | @property |
| 801 | def module_path(self): |
no test coverage detected