diff --git a/scripts/suse/dpkg/dpkgnotify b/scripts/suse/dpkg/dpkgnotify index 3859d06cab1..3d6d038a984 100644 --- a/scripts/suse/dpkg/dpkgnotify +++ b/scripts/suse/dpkg/dpkgnotify @@ -48,8 +48,8 @@ def dpkg_post_invoke(): chksum=_get_checksum(), mtime=_get_mtime() ) ) - except (IOError, OSError) as e: - sys.stderr.write("Unable to save the cookie file: {}\n".format(e)) + except OSError as e: + print("Unable to save the cookie file: %s" % (e), file=sys.stderr) if __name__ == "__main__":