Back to index

enigmail  1.4.3
Functions
printprereleasesuffix Namespace Reference

Functions

def get_prerelease_suffix

Function Documentation

Returns the prerelease suffix from the version string argument 

Definition at line 49 of file printprereleasesuffix.py.

00049 
00050 def get_prerelease_suffix(version):
00051   """ Returns the prerelease suffix from the version string argument """
00052 
00053   def mfunc(m):
00054     return " %s %s %s" % (m.group('prefix'),
00055                          {'a': 'Alpha', 'b': 'Beta'}[m.group('c')],
00056                          m.group('suffix'))
00057   result, c = re.subn(r'^(?P<prefix>(\d+\.)*\d+)(?P<c>[ab])(?P<suffix>\d+)$',
00058                       mfunc, version)
00059   if c != 1:
00060     return ''
00061   return result

Here is the caller graph for this function: