diff options
author | Tim Harder <radhermit@gmail.com> | 2021-07-29 02:44:51 -0600 |
---|---|---|
committer | Tim Harder <radhermit@gmail.com> | 2021-07-29 02:46:31 -0600 |
commit | 67898ddbe0d273165de7d40d64fa23577ac518e9 (patch) | |
tree | 18f927211c7a9f94e92c6b0914f66960bc16127b /src | |
parent | bump version (diff) | |
download | pkgdev-67898ddbe0d273165de7d40d64fa23577ac518e9.tar.gz pkgdev-67898ddbe0d273165de7d40d64fa23577ac518e9.tar.bz2 pkgdev-67898ddbe0d273165de7d40d64fa23577ac518e9.zip |
pkgdev commit: only update change data when altered
Diffstat (limited to 'src')
-rw-r--r-- | src/pkgdev/scripts/pkgdev_commit.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pkgdev/scripts/pkgdev_commit.py b/src/pkgdev/scripts/pkgdev_commit.py index 920555b..bb783a5 100644 --- a/src/pkgdev/scripts/pkgdev_commit.py +++ b/src/pkgdev/scripts/pkgdev_commit.py @@ -590,12 +590,13 @@ class Change: data = f.read() except (FileNotFoundError, UnicodeDecodeError): data = None - object.__setattr__(self, "data", data) + object.__setattr__(self, 'data', data) return data def update(self, data): """Update the change's cached file data.""" - object.__setattr__(self, "data", data) + if data != getattr(self, 'data', None): + object.__setattr__(self, 'data', data) return self def sync(self): |