~ubuntu-branches/ubuntu/utopic/ubuntu-drivers-common/utopic-proposed

« back to all changes in this revision

Viewing changes to detect-plugins/sl-modem.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2014-08-18 10:13:11 UTC
  • Revision ID: package-import@ubuntu.com-20140818101311-4lghiqzb4zyodln9
Tags: 1:0.2.97
* tests/testarchive.py: Organize debs in pool/ structure, for better
  reusability.
* tests/ubuntu_drivers.py: Drop expected failures, they've succeeded for a
  long time. This needs to be fixed properly if there's a bug.
* sl-modem plugin: Keep environment for aplay, just ensure it's using the C
  locale. (LP: #1296425)
* Disable linux-firmware-nonfree autopkgtest for now. bcma does not declare
  any firmware dependencies and linux-firmware-nonfree does not declare
  modaliases, so it either just works now, or the driver needs fixing first.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# (C) 2012 Canonical Ltd.
4
4
# Author: Martin Pitt <martin.pitt@ubuntu.com>
5
5
 
 
6
import os
6
7
import re
7
8
import logging
8
9
import subprocess
24
25
 
25
26
    # Check aplay -l
26
27
    try:
27
 
        aplay = subprocess.Popen(['aplay', '-l'], env={},
 
28
        env = os.environ.copy()
 
29
        try:
 
30
            del env['LANGUAGE']
 
31
        except KeyError:
 
32
            pass
 
33
        env['LC_ALL'] = 'C'
 
34
        aplay = subprocess.Popen(['aplay', '-l'], env=env,
28
35
                stdout=subprocess.PIPE, stderr=subprocess.PIPE,
29
36
                universal_newlines=True)
30
37
        (aplay_out, aplay_err) = aplay.communicate()