- (out, err) = runcmd(cmd)
- if err:
- raise RuntimeError(err)
- cmd = 'netstat -rn -finet'
- (out, err) = runcmd(cmd)
- if err:
- raise RuntimeError(err)
- print 'New route table'
- print out
+ if record:
+ output += "\n" + cmd
+ else:
+ (out, err) = runcmd(cmd)
+ if err:
+ raise RuntimeError(err)
+ if not record:
+ cmd = 'netstat -rn -finet'
+ (out, err) = runcmd(cmd)
+ if err:
+ raise RuntimeError(err)
+ print 'New route table'
+ print out