summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaptor Engineering Development Team <support@raptorengineering.com>2018-06-04 05:37:09 -0500
committerRaptor Engineering Development Team <support@raptorengineering.com>2018-06-04 05:38:49 -0500
commit43ac313fcb96e5667a2ec61082c13fb91f5bab82 (patch)
treea47cc45608df07cee35b283c3d0d5429d6bab068
parent55972758f693bfd4f9ee7216f4186ef0d2515d59 (diff)
downloadvpdtools-43ac313fcb96e5667a2ec61082c13fb91f5bab82.tar.gz
vpdtools-43ac313fcb96e5667a2ec61082c13fb91f5bab82.zip
Fix write_vpd i2cset calls
This suppresses the spurious write failure messages
-rwxr-xr-xwoferclock/write_vpd3
1 files changed, 1 insertions, 2 deletions
diff --git a/woferclock/write_vpd b/woferclock/write_vpd
index 225d32a..a21fd5e 100755
--- a/woferclock/write_vpd
+++ b/woferclock/write_vpd
@@ -49,14 +49,13 @@ for i in range(0, vpd_length, 2):
address_high = hex((address & 65280) >> 8)
address_low = hex(address & 255)
command = "i2cset -y " + str(eeprom_bus) + " 0x" + format(eeprom_address, '02x') + " " + address_high + " " + address_low + " 0x" + raw_data[i:(i+2)] + " i"
- i2c_ret = os.system(command)
try:
subprocess.check_call(command, stderr=subprocess.STDOUT, shell=True)
except:
# Retry, giving the SEEPROM some time to recover
time.sleep(0.1)
try:
- subprocess.check_call(command, shell=True)
+ subprocess.check_call(command, stderr=subprocess.STDOUT, shell=True)
except:
print "[ERROR] Write failed!"
print "\tCommand was: " + command
OpenPOWER on IntegriCloud