The -Y command line argument may need to be replaced with -R when an
older tshark version is used.
Signed-off-by: Jouni Malinen <j@w1.fi>
pass
if cmd:
- freq = cmd.stdout.read().splitlines()
+ (out,err) = cmd.communicate()
+ res = cmd.wait()
+ if res == 1:
+ arg[3] = '-R'
+ cmd = subprocess.Popen(arg, stdout=subprocess.PIPE,
+ stderr=open('/dev/null', 'w'))
+ (out,err) = cmd.communicate()
+ res = cmd.wait()
+
+ freq = out.splitlines()
if len(freq) != 2:
raise Exception("Unexpected number of Action frames (%d)" % len(freq))
if freq[0] != "2422":
pass
if cmd:
+ (out,err) = cmd.communicate()
+ res = cmd.wait()
+ if res == 1:
+ arg[3] = '-R'
+ cmd = subprocess.Popen(arg, stdout=subprocess.PIPE,
+ stderr=open('/dev/null', 'w'))
+ (out,err) = cmd.communicate()
+ res = cmd.wait()
+
last = None
- for l in cmd.stdout.read().splitlines():
+ for l in out.splitlines():
if "Operating Channel:" not in l:
continue
last = l