maebert/jrnl — pull request #323 by MinchinWeb (2014-12-17 17:11:03+00:00)
Title: Tempfile fix 2

Follow up to issue #308

jrnl v 1.9.8 gives the following error (Windows 7, Python 3.4.2):

~~~
Traceback (most recent call last):
File "C:\Python34\Scripts\jrnl-script.py", line 9, in
load_entry_point('jrnl==1.9.8', 'console_scripts', 'jrnl')()
File "C:\Python34\lib\site-packages\jrnl\cli.py", line 207, in run
raw = util.get_text_from_editor(config)
File "C:\Python34\lib\site-packages\jrnl\util.py", line 136, in get_text_from_
editor
os.remove(tmpfile)
PermissionError: [WinError 32] The process cannot access the file because it is
being used by another process: 'C:\\Users\\MinchinWeb\\AppData\\Local\\Temp\\jrnlca
cewc39.txt'
~~~

The following pull request fixes it by first closing the tempfile, and then it can be removed.

The last three commits ( 0438ff3 , 4527866 and 0f5bc64 ) are the only ones that should be new.