Prevent scarry error at startup (pyinotify ERROR ... ENOENT)

If the clipboard file doesn't exist (and it doesn't at system startup),
pyinotify will output an error to stderr. This situation is already
handled by also monitoring the directory itself for CREATE event. But
prevent error message.
This commit is contained in:
Marek Marczykowski-Górecki 2015-11-27 01:33:42 +01:00
parent 0a5a5253b0
commit f5b1a34894
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -2057,8 +2057,9 @@ def main():
EventsCodes.OP_FLAGS.get('IN_MODIFY'))
wm.add_watch(os.path.dirname(system_path["qubes_store_filename"]),
EventsCodes.OP_FLAGS.get('IN_MOVED_TO'))
wm.add_watch(qubes_clipboard_info_file,
EventsCodes.OP_FLAGS.get('IN_CLOSE_WRITE'))
if os.path.exists(qubes_clipboard_info_file):
wm.add_watch(qubes_clipboard_info_file,
EventsCodes.OP_FLAGS.get('IN_CLOSE_WRITE'))
wm.add_watch(os.path.dirname(qubes_clipboard_info_file),
EventsCodes.OP_FLAGS.get('IN_CREATE'))
wm.add_watch(os.path.dirname(table_widgets.qubes_dom0_updates_stat_file),