Skip to content

Commit 8e4030f

Browse files
committed
subprocess.call('rm -f filename', shell=True) is replaced with os.remove(filename) for windows. Thanks Lorenzo
1 parent 3ade708 commit 8e4030f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

pyverilog/vparser/parser.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import sys
1212
import os
13-
import subprocess
1413

1514
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) )
1615

@@ -1745,8 +1744,7 @@ def preprocess(filelist, preprocess_output='preprocess.output'):
17451744
pre = VerilogPreprocessor(filelist, preprocess_output)
17461745
pre.preprocess()
17471746
text = open(preprocess_output).read()
1748-
rm = 'rm -f ' + preprocess_output
1749-
subprocess.call(rm, shell=True)
1747+
os.remove(preprocess_output)
17501748
return text
17511749

17521750
def parse(filelist, preprocess_output='preprocess.output', debug=0):
@@ -1769,8 +1767,7 @@ def __init__(self, filelist, preprocess_output='preprocess.output',
17691767
def preprocess(self):
17701768
self.preprocessor.preprocess()
17711769
text = open(self.preprocess_output).read()
1772-
rm = 'rm -f ' + self.preprocess_output
1773-
subprocess.call(rm, shell=True)
1770+
os.remove(self.preprocess_output)
17741771
return text
17751772

17761773
def parse(self, preprocess_output='preprocess.output', debug=0):

0 commit comments

Comments
 (0)