Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"set sublime tab_size for python" task doesn't work if 'Python.sublime-settings' file doesn't exist #17

Closed
radomirbosak opened this issue Jan 30, 2017 · 1 comment

Comments

@radomirbosak
Copy link
Owner

TASK [sublime_text : set sublime tab_size for python] **************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: IOError: [Errno 2] No such file or directory: '/home/user/.config/sublime-text-3/Packages/User/Python.sublime-settings'
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_7XazUa/ansible_module_json_edit.py\", line 121, in <module>\n    main()\n  File \"/tmp/ansible_7XazUa/ansible_module_json_edit.py\", line 105, in main\n    json_dict = read_dict(filename)\n  File \"/tmp/ansible_7XazUa/ansible_module_json_edit.py\", line 78, in read_dict\n    file_cont = open(filename, 'r').read()\nIOError: [Errno 2] No such file or directory: '/home/user/.config/sublime-text-3/Packages/User/Python.sublime-settings'\n", "module_stdout": "", "msg": "MODULE FAILURE"}
	to retry, use: --limit @/home/user/repos/fedora-setup/main.retry
@radomirbosak
Copy link
Owner Author

radomirbosak commented Feb 18, 2017

This is the python traceback printed prettier:

Traceback (most recent call last):
  File "/tmp/ansible_7XazUa/ansible_module_json_edit.py", line 121, in <module>
    main()
  File "/tmp/ansible_7XazUa/ansible_module_json_edit.py", line 105, in main
    json_dict = read_dict(filename)
  File "/tmp/ansible_7XazUa/ansible_module_json_edit.py", line 78, in read_dict
    file_cont = open(filename, 'r').read()
IOError: [Errno 2] No such file or directory: '/home/user/.config/sublime-text-3/Packages/User/Python.sublime-settings'

The json module should be changed to handle a non-existent file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant