[Buildbot-commits] [Buildbot] #2417: sa_version in sautils

Buildbot nobody at buildbot.net
Thu Dec 20 09:09:42 UTC 2012


#2417: sa_version in sautils
------------------------+---------------------------------------
Reporter:  abracadaber  |      Owner:
    Type:  defect       |     Status:  new
Priority:  major        |  Milestone:  0.8.+
 Version:  0.8.7p1      |   Keywords:  master-create, sa_version
------------------------+---------------------------------------
 sa_version function from buildbot.util.sautils failed with exception when
 creating master:[[BR]][[BR]]
 buildbot create-master master[[BR]]
 updating existing installation[[BR]]
 buildbot.tac already exists and is correct[[BR]]
 creating /home/*****/.virtualenvs/buildbot/master/master.cfg.sample[[BR]]
 public_html/ already exists: not replacing[[BR]]
 templates/ already exists: not replacing[[BR]]
 Traceback (most recent call last):
   File "/home/*****/.virtualenvs/buildbot/local/lib/python2.7/site-
 packages/Twisted-12.2.0-py2.7-linux-i686.egg/twisted/internet/defer.py",
 line 1187, in unwindGenerator
     return _inlineCallbacks(None, gen, Deferred())
   File "/home/*****/.virtualenvs/buildbot/local/lib/python2.7/site-
 packages/Twisted-12.2.0-py2.7-linux-i686.egg/twisted/internet/defer.py",
 line 1045, in _inlineCallbacks
     result = g.send(result)
   File "/home/*****/.virtualenvs/buildbot/local/lib/python2.7/site-
 packages/buildbot-0.8.7p1-py2.7.egg/buildbot/scripts/create_master.py",
 line 145, in createMaster
     yield createDB(config)
   File "/home/*****/.virtualenvs/buildbot/local/lib/python2.7/site-
 packages/Twisted-12.2.0-py2.7-linux-i686.egg/twisted/internet/defer.py",
 line 1187, in unwindGenerator
     return _inlineCallbacks(None, gen, Deferred())
 --- <exception caught here> ---
   File "/home/*****/.virtualenvs/buildbot/local/lib/python2.7/site-
 packages/Twisted-12.2.0-py2.7-linux-i686.egg/twisted/internet/defer.py",
 line 1045, in _inlineCallbacks
     result = g.send(result)
   File "/home/*****/.virtualenvs/buildbot/local/lib/python2.7/site-
 packages/buildbot-0.8.7p1-py2.7.egg/buildbot/scripts/create_master.py",
 line 122, in createDB
     monkeypatches.patch_all()
   File "/home/*****/.virtualenvs/buildbot/local/lib/python2.7/site-
 packages/buildbot-0.8.7p1-py2.7.egg/buildbot/monkeypatches/__init__.py",
 line 69, in patch_all
     patch_sqlalchemy2364()
   File "/home/*****/.virtualenvs/buildbot/local/lib/python2.7/site-
 packages/buildbot-0.8.7p1-py2.7.egg/buildbot/monkeypatches/__init__.py",
 line 55, in patch_sqlalchemy2364
     if sautils.sa_version() < (0,7,5):
   File "/home/*****/.virtualenvs/buildbot/local/lib/python2.7/site-
 packages/buildbot-0.8.7p1-py2.7.egg/buildbot/util/sautils.py", line 36, in
 sa_version
     return tuple(map(int, sa.__version__.split('.')))
 exceptions.ValueError: invalid literal for int() with base 10: '0b2'
 [[BR]][[BR]]
 I think, it should not take into account the third level of
 numbering.[[BR]]
 Something like this:[[BR]][[BR]]
 def sa_version():
     if hasattr(sa, '__version__'):
         return tuple(map(int, sa.__version__.split('.')[:2]))
     return (0,0) # "it's old"

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2417>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list