Skip to content
Snippets Groups Projects
Commit f6e16e5e authored by Administrator's avatar Administrator
Browse files

shift the exit code >>8

parent 1e053dbf
Branches
Tags
No related merge requests found
......@@ -416,14 +416,14 @@ def make_selection(v, vstatus):
price, shortname, name = get_snack( '--' )
dollarprice = "$%.2f" % ( price / 100.0 )
v.display(vstatus.cur_selection+' - %s'%dollarprice)
exitcode = os.system('su - "%s" -c "dispense give oday %d"'%(vstatus.username, price))
exitcode = os.system('su - "%s" -c "dispense give oday %d"'%(vstatus.username, price)) >> 8
if (exitcode == 0):
# magic dispense syslog service
syslog.syslog(syslog.LOG_INFO | syslog.LOG_LOCAL4, "vended %s (slot %s) for %s" % (name, vstatus.cur_selection, vstatus.username))
v.vend(vstatus.cur_selection)
v.display('THANK YOU')
else:
syslog.syslog(syslog.LOG_INFO | syslog.LOG_LOCAL4, "failed vending %s (slot %s) for %s, code %d" % (name, vstatus.cur_selection, vstatus.username, exitcode))
syslog.syslog(syslog.LOG_INFO | syslog.LOG_LOCAL4, "failed vending %s (slot %s) for %s (code %d)" % (name, vstatus.cur_selection, vstatus.username, exitcode))
v.display('NO MONEY?')
sleep(1)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment