Revision 78521495 lib/utils/version.py

b/lib/utils/version.py
119 119
    return "can only downgrade one minor version at a time"
120 120

  
121 121
  return None
122

  
123

  
124
def ShouldCfgdowngrade(version, current=CURRENT_VERSION):
125
  """Decide whether cfgupgrade --downgrade should be called.
126

  
127
  Given the current version and the version to change to, decide
128
  if in the transition process cfgupgrade --downgrade should
129
  be called
130

  
131
  @param version: The version to upgrade to as (major, minor, revision)
132
  @type version: tuple
133
  @param current: The versino to upgrade from as (major, minor, revision)
134
  @type current: tuple
135
  @rtype: bool
136
  @return: True, if cfgupgrade --downgrade should be called.
137

  
138
  """
139
  return version[0] == current[0] and version[1] == current[1] - 1

Also available in: Unified diff