Merge lp:~allenap/postgresfixture/open-devnull-for-write into lp:~lazr-developers/postgresfixture/trunk

Proposed by Gavin Panella
Status: Merged
Approved by: Gavin Panella
Approved revision: 6
Merged at revision: 6
Proposed branch: lp:~allenap/postgresfixture/open-devnull-for-write
Merge into: lp:~lazr-developers/postgresfixture/trunk
Diff against target: 12 lines (+1/-1)
1 file modified
postgresfixture/cluster.py (+1/-1)
To merge this branch: bzr merge lp:~allenap/postgresfixture/open-devnull-for-write
Reviewer Review Type Date Requested Status
Gavin Panella Approve
Review via email: mp+115218@code.launchpad.net

Commit message

In Cluster.running, ppen /dev/null for write when using it as stdout.

Description of the change

In Cluster.running, /dev/null was being opened with "rb", though it is passed as the stdout argument to subprocess.Popen (indirectly). I've changed this to "wb".

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'postgresfixture/cluster.py'
2--- postgresfixture/cluster.py 2012-05-22 22:27:47 +0000
3+++ postgresfixture/cluster.py 2012-07-16 20:19:18 +0000
4@@ -118,7 +118,7 @@
5 @property
6 def running(self):
7 """Whether this cluster is running or not."""
8- with open(devnull, "rb") as null:
9+ with open(devnull, "wb") as null:
10 try:
11 self.execute("pg_ctl", "status", stdout=null)
12 except CalledProcessError, error:

Subscribers

People subscribed via source and target branches

to all changes: