Move imports to the top

This commit is contained in:
Philipp Hörist 2019-03-25 22:26:55 +01:00
parent 7a5d791beb
commit 8201688684
1 changed files with 5 additions and 6 deletions

View File

@ -42,6 +42,7 @@ import logging
import json import json
import shutil import shutil
import collections import collections
from io import StringIO
from datetime import datetime, timedelta from datetime import datetime, timedelta
from distutils.version import LooseVersion as V from distutils.version import LooseVersion as V
from encodings.punycode import punycode_encode from encodings.punycode import punycode_encode
@ -60,6 +61,10 @@ from gajim.common.i18n import ngettext
from gajim.common.const import ShowConstant from gajim.common.const import ShowConstant
from gajim.common.const import Display from gajim.common.const import Display
if app.is_installed('PYCURL'):
import pycurl
log = logging.getLogger('gajim.c.helpers') log = logging.getLogger('gajim.c.helpers')
special_groups = (_('Transports'), _('Not in Roster'), _('Observers'), _('Groupchats')) special_groups = (_('Transports'), _('Not in Roster'), _('Observers'), _('Groupchats'))
@ -558,12 +563,6 @@ def datetime_tuple(timestamp):
tim = tim.timetuple() tim = tim.timetuple()
return tim return tim
from gajim.common import app
if app.is_installed('PYCURL'):
import pycurl
from io import StringIO
def convert_bytes(string): def convert_bytes(string):
suffix = '' suffix = ''
# IEC standard says KiB = 1024 bytes KB = 1000 bytes # IEC standard says KiB = 1024 bytes KB = 1000 bytes