Use subprocess instead of os.system.

os.system wasn't working on Ubuntu?

I like the syntax of Popen better anyways.
This commit is contained in:
noah morrison
2015-03-23 22:42:21 -04:00
parent bcc76ff21a
commit 98c820fe4f

View File

@@ -4,6 +4,7 @@ import time
import os
from uuid import uuid4
from tempfile import NamedTemporaryFile
from subprocess import Popen
import praw.errors
@@ -265,7 +266,7 @@ class SubmissionPage(BasePage):
return
curses.endwin()
os.system(editor + ' ' + fp.name)
Popen([editor, fp.name]).wait()
curses.doupdate()
fp.seek(0)