Skip to content

Commit

Permalink
fix pylint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
soheilshahrouz committed Feb 13, 2024
1 parent b9add7f commit 581c3a4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions vtr_flow/scripts/python_libs/vtr/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,16 @@ def run_system_command(
try:
# Call the command
stderr = None if self._valgrind else subprocess.STDOUT
'''
capnproto accesses PWD environment variable to learn about the current working directory.
However, subprocess.Popen() changes the working directory without updating this variable.
This can cause issues when a VTR task passes router lookahead or RR graph files to VPR.
PWD environment variable is updated manually to prevent capnproto from throwing exceptions.
'''

# capnproto accesses PWD environment variable to learn about
# the current working directory. However, subprocess.Popen()
# changes the working directory without updating this variable.
# This can cause issues when a VTR task passes router lookahead
# or RR graph files to VPR. PWD environment variable is updated
# manually to prevent capnproto from throwing exceptions.
modified_environ = os.environ.copy()
modified_environ['PWD'] = str(temp_dir)

proc = subprocess.Popen(
cmd,
stdout=subprocess.PIPE, # We grab stdout
Expand Down

0 comments on commit 581c3a4

Please sign in to comment.