From 82016886843c1c2b65dd592000913b75b939dc01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Mon, 25 Mar 2019 22:26:55 +0100 Subject: [PATCH] Move imports to the top --- gajim/common/helpers.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gajim/common/helpers.py b/gajim/common/helpers.py index 896067d9a..3f5f86e9e 100644 --- a/gajim/common/helpers.py +++ b/gajim/common/helpers.py @@ -42,6 +42,7 @@ import logging import json import shutil import collections +from io import StringIO from datetime import datetime, timedelta from distutils.version import LooseVersion as V 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 Display +if app.is_installed('PYCURL'): + import pycurl + + log = logging.getLogger('gajim.c.helpers') special_groups = (_('Transports'), _('Not in Roster'), _('Observers'), _('Groupchats')) @@ -558,12 +563,6 @@ def datetime_tuple(timestamp): tim = tim.timetuple() return tim - -from gajim.common import app -if app.is_installed('PYCURL'): - import pycurl - from io import StringIO - def convert_bytes(string): suffix = '' # IEC standard says KiB = 1024 bytes KB = 1000 bytes