Skip to content

Commit

Permalink
capture stderr as well as stdout when diagnosing
Browse files Browse the repository at this point in the history
This fixes OCA/server-tools#125 because in some Ubuntu systems
lsb_release outputs to stderr as well as stdout. This message will be
printed to console, not logged nor shown among server infomation. That
way the message is lost and only pollutes unit tests output.
  • Loading branch information
lepistone committed Feb 5, 2015
1 parent 0edf9f5 commit ad31f07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion system_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@

def _get_output(cmd):
bindir = config['root_path']
p = subprocess.Popen(cmd, shell=True, cwd=bindir, stdout=subprocess.PIPE)
p = subprocess.Popen(cmd, shell=True, cwd=bindir, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
return p.communicate()[0].rstrip()


Expand Down

0 comments on commit ad31f07

Please sign in to comment.