Commit the transaction. Normally transactions are used as context managers and commit or rollback automatically, but it may be done explicitly if needed. A ``dns.transaction.Ended`` exception will be raised if you try to use a transaction after it has been committed
(self)
| 296 | return self._changed() |
| 297 | |
| 298 | def commit(self) -> None: |
| 299 | """Commit the transaction. |
| 300 | |
| 301 | Normally transactions are used as context managers and commit |
| 302 | or rollback automatically, but it may be done explicitly if needed. |
| 303 | A ``dns.transaction.Ended`` exception will be raised if you try |
| 304 | to use a transaction after it has been committed or rolled back. |
| 305 | |
| 306 | Raises an exception if the commit fails (in which case the transaction |
| 307 | is also rolled back. |
| 308 | """ |
| 309 | self._end(True) |
| 310 | |
| 311 | def rollback(self) -> None: |
| 312 | """Rollback the transaction. |