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
@ -16,16 +16,18 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
from Base import BaseFolder
|
||||
import imaplib
|
||||
from offlineimap import imaputil, imaplibutil
|
||||
from offlineimap.ui import UIBase
|
||||
from offlineimap.version import versionstr
|
||||
import rfc822, time, string, random, binascii, re
|
||||
import rfc822
|
||||
import string
|
||||
import random
|
||||
import binascii
|
||||
import re
|
||||
from StringIO import StringIO
|
||||
from copy import copy
|
||||
import time
|
||||
|
||||
from Base import BaseFolder
|
||||
from offlineimap import imaputil, imaplibutil, __version__
|
||||
from offlineimap.ui import UIBase
|
||||
|
||||
class IMAPFolder(BaseFolder):
|
||||
def __init__(self, imapserver, name, visiblename, accountname, repository):
|
||||
@ -226,7 +228,7 @@ class IMAPFolder(BaseFolder):
|
||||
headervalue += binascii.hexlify(self.getname())
|
||||
headervalue += '-%d-' % long(time.time())
|
||||
headervalue += str(self.randomgenerator.random()).replace('.', '')
|
||||
headervalue += '-v' + versionstr
|
||||
headervalue += '-v' + offlineimap.__version__
|
||||
return (headername, headervalue)
|
||||
|
||||
def savemessage_addheader(self, content, headername, headervalue):
|
||||
|
Reference in New Issue
Block a user