From 669671e0b22d09c5456db10a1889355be4b8f8a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Philipp=20H=C3=B6rist?= <philipp@hoerist.com>
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 2596121e7c..7ccbb5b0ab 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
@@ -59,6 +60,10 @@ from gajim.common.i18n import _
 from gajim.common.i18n import ngettext
 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'))
@@ -554,12 +559,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
-- 
GitLab