Define version constants etc in __init__.py
Move central constant definitions into __init__.py. This does away with version.py which contained nothing else and __init__.py is where things like __VERSION__ are usually defined. This commit also changes code to use offlineimap.__version__ rather than offlineimap.version.__version__ as was before. Cleaned up some duplicate or unneeded imports while touching those, formatting import statements per PEP8 (one import per row). Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:

committed by
Nicolas Sebrecht

parent
229bcca491
commit
0b5b38d298
@ -61,8 +61,8 @@ class UIBase:
|
||||
def setlogfd(s, logfd):
|
||||
s.logfile = logfd
|
||||
logfd.write("This is %s %s\n" % \
|
||||
(offlineimap.version.productname,
|
||||
offlineimap.version.versionstr))
|
||||
(offlineimap.__productname__,
|
||||
offlineimap.__version__))
|
||||
logfd.write("Python: %s\n" % sys.version)
|
||||
logfd.write("Platform: %s\n" % sys.platform)
|
||||
logfd.write("Args: %s\n" % sys.argv)
|
||||
@ -174,7 +174,7 @@ class UIBase:
|
||||
where the UI should do its setup -- TK, for instance, would
|
||||
create the application window here."""
|
||||
if s.verbose >= 0:
|
||||
s._msg(offlineimap.version.banner)
|
||||
s._msg(offlineimap.banner)
|
||||
|
||||
def connecting(s, hostname, port):
|
||||
if s.verbose < 0:
|
||||
|
Reference in New Issue
Block a user