Move imports to the top
This commit is contained in:
parent
0e9422ae9b
commit
669671e0b2
|
@ -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
|
||||||
|
@ -59,6 +60,10 @@ from gajim.common.i18n import _
|
||||||
from gajim.common.i18n import ngettext
|
from gajim.common.i18n import ngettext
|
||||||
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'))
|
||||||
|
@ -554,12 +559,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
|
||||||
|
|
Loading…
Reference in New Issue