[fluksod] create empty table for arg when not called from the Lua interpreter

This commit is contained in:
Bart Van Der Meerssche 2011-01-28 10:14:17 +01:00
parent 4e4f4a8f88
commit fd51388300
1 changed files with 2 additions and 0 deletions

View File

@ -26,6 +26,8 @@ local spi = require 'flukso.spi'
local nixio = require 'nixio'
nixio.fs = require 'nixio.fs'
local arg = arg or {} -- needed when this code is not loaded via the interpreter
local DEBUG = (arg[1] == '-d')
local SPI_DEV = '/dev/spidev0.0'