diff --git a/qubes-rpc/qubes-notify-updates b/qubes-rpc/qubes-notify-updates index 2dd851b8..88ea6ce0 100755 --- a/qubes-rpc/qubes-notify-updates +++ b/qubes-rpc/qubes-notify-updates @@ -61,7 +61,10 @@ def main(): update_f = open(source_vm.dir_path + '/' + vm_files["updates_stat_file"], "w") update_f.write(update_count) update_f.close() - os.chown(source_vm.dir_path + '/' + vm_files["updates_stat_file"], -1, qubes_gid) + try: + os.chown(source_vm.dir_path + '/' + vm_files["updates_stat_file"], -1, qubes_gid) + except OSError: + pass elif source_vm.template is not None: # Hint about updates availability in template # If template is running - it will notify about updates itself @@ -79,8 +82,11 @@ def main(): update_f = open(stat_file, "w") update_f.write(update_count) update_f.close() - os.chown(stat_file, -1, qubes_gid) + try: + os.chown(stat_file, -1, qubes_gid) + except OSError: + pass else: print >> sys.stderr, 'Ignoring notification of no updates' -main() +main() \ No newline at end of file