forked from epics_driver_modules/motorBase
Use subprocess.call instead of subprocess.run on older versions of python
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
# Comment out SUPPORT from motor's RELEASE file
|
||||
status = subprocess.run(['sed', '-i', '-e', "s|^\(SUPPORT=.*\)$|#\1|g", './configure/RELEASE'])
|
||||
if sys.version_info >= (3, 5):
|
||||
status = subprocess.run(['sed', '-i', '-e', "s|^\(SUPPORT=.*\)$|#\1|g", './configure/RELEASE'])
|
||||
else:
|
||||
status = subprocess.call(['sed', '-i', '-e', "s|^\(SUPPORT=.*\)$|#\1|g", './configure/RELEASE'])
|
||||
#
|
||||
print("{}Updated motor/configure/RELEASE{}".format(ANSI_BLUE, ANSI_RESET))
|
||||
#!grep SUPPORT ./configure/RELEASE || :
|
||||
@@ -12,7 +16,10 @@ os.system('cat ./configure/RELEASE')
|
||||
print("{}End of updated motor/configure/RELEASE{}".format(ANSI_BLUE, ANSI_RESET))
|
||||
|
||||
# Comment out SUPPORT from motorOms's RELEASE file
|
||||
status = subprocess.run(['sed', '-i', '-e', "s|^\(SUPPORT=.*\)$|#\1|g", './modules/motorOms/configure/RELEASE'])
|
||||
if sys.version_info >= (3, 5):
|
||||
status = subprocess.run(['sed', '-i', '-e', "s|^\(SUPPORT=.*\)$|#\1|g", './modules/motorOms/configure/RELEASE'])
|
||||
else:
|
||||
status = subprocess.call(['sed', '-i', '-e', "s|^\(SUPPORT=.*\)$|#\1|g", './modules/motorOms/configure/RELEASE'])
|
||||
#
|
||||
print("{}Updated motor/modules/motorOms/configure/RELEASE{}".format(ANSI_BLUE, ANSI_RESET))
|
||||
#!grep SUPPORT ./modules/motorOms/configure/RELEASE || :
|
||||
|
||||
Reference in New Issue
Block a user