Skip to content

Commit

Permalink
Simplifications in process.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Nodd committed Sep 10, 2023
1 parent 545b6d7 commit c88c054
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/lineprofilergui/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ def prepare(self):

# Manage environment
qenv = QtCore.QProcessEnvironment.systemEnvironment()
for name, value in self.config.env.items():
qenv.insert(name, value)
qenv.insert(self.config.env)
self.process.setProcessEnvironment(qenv)

self.process.setWorkingDirectory(self.config.wdir)
Expand Down Expand Up @@ -57,11 +56,9 @@ def start(self):
QtCore.QIODevice.ReadOnly | QtCore.QIODevice.Unbuffered,
)

# Check file cache now, to try to keep profiled files in the state that they were run
linecache.checkcache()

running = self.process.waitForStarted()
if not running:
if not self.process.waitForStarted():
self.output_error.emit(_("ERROR: Process failed to start"))

@QtCore.Slot()
Expand Down

0 comments on commit c88c054

Please sign in to comment.