~treaves/trac-bzr/trac-bzr

« back to all changes in this revision

Viewing changes to bzrplugin/__init__.py

  • Committer: Stanislav Kopp
  • Date: 2013-06-03 21:16:27 UTC
  • mfrom: (128.1.1 trac-bzr)
  • Revision ID: staskopp@gmail.com-20130603211627-a1858ls3353o2ot5
Fix detection of trac version to work with version 1.0.x

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
def check_trac_version():
42
42
    import trac
43
 
    trac_version = (int(trac.__version__[0]), int(trac.__version__[2:4]))
 
43
    major, minor, patch = trac.__version__.split('.')
 
44
    trac_version = (int(major), int(minor))
44
45
    if trac_version < (0,12):
45
46
        trace.warning("bzr-trac hook needs Trac >= 0.12")
46
47