Commit 644e5918 authored by Miguel Gómez Sexto's avatar Miguel Gómez Sexto Committed by Samuel Iglesias Gonsálvez

Fix chan check

Signed-off-by: Miguel Gómez Sexto's avatarMiguel Gomez <magomez@igalia.com>
Signed-off-by: Samuel Iglesias Gonsálvez's avatarSamuel Iglesias Gonsalvez <siglesias@igalia.com>
parent 30c73c2d
......@@ -220,13 +220,13 @@ class Cli(cmd.Cmd):
print "Invalid arguments"
return
chan = chan_mask(args[0])
nsamples = int(args[1])
if (chan < 0) or (chan > 4):
if (int(args[0]) < 0) or (int(args[0]) > 4):
print "Invalid channel"
return
chan = chan_mask(args[0])
nsamples = int(args[1])
ptr = POINTER(tdc_time)
self.libtdc.tdc_zalloc.restype = ptr
samples = self.libtdc.tdc_zalloc(nsamples)
......
Markdown is supported
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