← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~lifeless/python-pgbouncer/bug-846236 into lp:python-pgbouncer

 

Robert Collins has proposed merging lp:~lifeless/python-pgbouncer/bug-846236 into lp:python-pgbouncer.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #846236 in Python PGBouncer: "pgbouncer fixture breaking in buildbot"
  https://bugs.launchpad.net/python-pgbouncer/+bug/846236

For more details, see:
https://code.launchpad.net/~lifeless/python-pgbouncer/bug-846236/+merge/75091

Alternative fix for the race condition in python-pgbouncer.
-- 
https://code.launchpad.net/~lifeless/python-pgbouncer/bug-846236/+merge/75091
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~lifeless/python-pgbouncer/bug-846236 into lp:python-pgbouncer.
=== modified file 'pgbouncer/__init__.py'
--- pgbouncer/__init__.py	2011-09-12 22:55:57 +0000
+++ pgbouncer/__init__.py	2011-09-12 23:40:24 +0000
@@ -25,7 +25,7 @@
 # established at this point, and setup.py will use a version of next-$(revno).
 # If the releaselevel is 'final', then the tarball will be major.minor.micro.
 # Otherwise it is major.minor.micro~$(revno).
-__version__ = (0, 0, 1, 'beta', 0)
+__version__ = (0, 0, 5, 'beta', 0)
 
 __all__ = [
     'PGBouncerFixture',

=== modified file 'pgbouncer/fixture.py'
--- pgbouncer/fixture.py	2011-09-12 22:55:57 +0000
+++ pgbouncer/fixture.py	2011-09-12 23:40:24 +0000
@@ -147,6 +147,10 @@
         stop = start + 5.0
         while time.time() < stop:
             if os.path.isfile(self.pidpath):
-                self.process_pid = int(file(self.pidpath, 'rt').read())
+                try:
+                    self.process_pid = int(file(self.pidpath, 'rt').read())
+                except ValueError:
+                    # Empty pid files -> ValueError.
+                    continue
                 return
         raise Exception('timeout waiting for pgbouncer to create pid file')

=== modified file 'setup.py'
--- setup.py	2011-09-12 22:55:57 +0000
+++ setup.py	2011-09-12 23:40:24 +0000
@@ -22,7 +22,7 @@
 description = file(os.path.join(os.path.dirname(__file__), 'README'), 'rb').read()
 
 setup(name="pgbouncer",
-      version="0.0.2",
+      version="0.0.5",
       description="Fixture to bring up temporary pgbouncer instance.",
       long_description=description,
       maintainer="Launchpad Developers",
@@ -31,7 +31,7 @@
       packages=['pgbouncer'],
       package_dir = {'':'.'},
       classifiers = [
-          'Development Status :: 2 - Pre-Alpha',
+          'Development Status :: 4 - Beta',
           'Intended Audience :: Developers',
           'License :: OSI Approved :: GNU Affero General Public License v3',
           'Operating System :: OS Independent',