~vcs-imports/system-config-printer/master

« back to all changes in this revision

Viewing changes to troubleshoot/VerifyPackages.py

  • Committer: Tim Waugh
  • Date: 2014-09-11 11:23:14 UTC
  • Revision ID: git-v1:d7de665ca6ec69b2c268d7eb7e7b351b39fc64e8
More use of subprocess.DEVNULL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
## Printing troubleshooter
4
4
 
5
 
## Copyright (C) 2010 Red Hat, Inc.
 
5
## Copyright (C) 2010, 2014 Red Hat, Inc.
6
6
## Copyright (C) 2010 Jiri Popelka <jpopelka@redhat.com>
7
7
 
8
8
## This program is free software; you can redistribute it and/or modify
45
45
                    "hpijs",
46
46
                    "hplip",
47
47
                    "system-config-printer"]
48
 
        null = open ("/dev/null", "r+")
49
48
        parent = self.troubleshooter.get_window ()
50
49
 
51
50
        new_environ = os.environ.copy()
58
57
                                           args=verification_args,
59
58
                                           close_fds=True,
60
59
                                           env=new_environ,
61
 
                                           stdin=null,
 
60
                                           stdin=subprocess.DEVNULL,
62
61
                                           stdout=subprocess.PIPE,
63
 
                                           stderr=null)
 
62
                                           stderr=subprocess.DEVNULL)
64
63
                (verif_stdout, verif_stderr, result) = self.op.run ()
65
64
            except:
66
65
                # Problem executing command.