I am trying to open a file "test_msm8974.sh" from the root directory using the following code,even though the file is present I keep getting the error beow,is there a better way to implement this or suggestions on why the script is not finding it?
try:
with open("test_" + target + ".sh") as f: pass
copy("test_" + target + ".sh", BUILD_ROOT_DIR)
except IOError as e:
print "test_" + target + ".sh" + " file missing"
raise
I keep getting the following error even though the file is present
Traceback (most recent call last):
File "g2g_integration.py", line 612, in <module>
main()
File "g2g_integration.py", line 430, in main
with open("test_" + target + ".sh") as f: pass
IOError: [Errno 2] No such file or directory: 'test_msm8974.sh'