~notmyname/swift/saio_reference

« back to all changes in this revision

Viewing changes to swift/__init__.py

  • Committer: gholt
  • Date: 2011-05-31 18:09:53 UTC
  • mfrom: (304 swift)
  • mto: This revision was merged to the branch mainline in revision 306.
  • Revision ID: gholt@rackspace.com-20110531180953-cm460hugws6uz8u6
MergedĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import gettext
2
2
 
3
3
 
4
 
__version__ = '1.4-dev'
 
4
class Version(object):
 
5
    def __init__(self, canonical_version, final):
 
6
        self.canonical_version = canonical_version
 
7
        self.final = final
 
8
 
 
9
    @property
 
10
    def pretty_version(self):
 
11
        if self.final:
 
12
            return self.canonical_version
 
13
        else:
 
14
            return '%s-dev' % (self.canonical_version,)
 
15
 
 
16
 
 
17
_version = Version('1.4.1', False)
 
18
__version__ = _version.pretty_version
 
19
__canonical_version__ = _version.canonical_version
 
20
 
5
21
gettext.install('swift')