mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 13:08:31 +02:00
Clean up debug statements
This commit is contained in:
parent
5d75bc25c7
commit
b1c7deb9b9
1 changed files with 0 additions and 3 deletions
|
@ -73,16 +73,13 @@ def open_editor_and_enter(context, text=""):
|
||||||
text = (text or context.text)
|
text = (text or context.text)
|
||||||
print("open_editor_and_enter called")
|
print("open_editor_and_enter called")
|
||||||
def _mock_editor_function(command):
|
def _mock_editor_function(command):
|
||||||
print("_mock_editor_function called")
|
|
||||||
tmpfile = command[-1]
|
tmpfile = command[-1]
|
||||||
print("TMPFILE:", tmpfile)
|
|
||||||
with open(tmpfile, "w+") as f:
|
with open(tmpfile, "w+") as f:
|
||||||
if text is not None:
|
if text is not None:
|
||||||
f.write(text)
|
f.write(text)
|
||||||
else:
|
else:
|
||||||
f.write("")
|
f.write("")
|
||||||
|
|
||||||
print("File contents:", open(tmpfile, "r").read())
|
|
||||||
return tmpfile
|
return tmpfile
|
||||||
|
|
||||||
with patch('subprocess.call', side_effect=_mock_editor_function):
|
with patch('subprocess.call', side_effect=_mock_editor_function):
|
||||||
|
|
Loading…
Add table
Reference in a new issue