summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHartmut Goebel <h.goebel@crazy-compilers.com>2019-01-19 20:45:39 +0100
committerHartmut Goebel <h.goebel@crazy-compilers.com>2019-01-19 20:45:39 +0100
commit87ecb652bf4abaac99b104a3dcbb49721d758ff3 (patch)
tree013493696a395d990565e49d391020985c42ac12
parentcc1e04b00f7f4f3dc085bcff666548510ef597da (diff)
Use relative imports.
-rw-r--r--gnunet/__init__.py2
-rw-r--r--gnunet/_dbus_utils.py6
-rw-r--r--gnunet/crypto.py4
-rw-r--r--gnunet/dht.py7
-rw-r--r--gnunet/gns.py8
-rw-r--r--gnunet/strings.py2
6 files changed, 14 insertions, 15 deletions
diff --git a/gnunet/__init__.py b/gnunet/__init__.py
index 4ba5bd7..eb43c56 100644
--- a/gnunet/__init__.py
+++ b/gnunet/__init__.py
@@ -1,4 +1,4 @@
-import gnunet.strings as strings
+from . import strings
class GNUNetDaemonError(Exception):
diff --git a/gnunet/_dbus_utils.py b/gnunet/_dbus_utils.py
index 803f8bb..2eb317f 100644
--- a/gnunet/_dbus_utils.py
+++ b/gnunet/_dbus_utils.py
@@ -1,8 +1,10 @@
-from gnunet import _Key, GNUNetDaemonError
-import gnunet.strings as strings
+from . import _Key, GNUNetDaemonError
+from . import strings
+
import dbus
import threading
import datetime
+
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
diff --git a/gnunet/crypto.py b/gnunet/crypto.py
index 5a82c0d..c4841d5 100644
--- a/gnunet/crypto.py
+++ b/gnunet/crypto.py
@@ -1,6 +1,4 @@
-from gnunet import _Key
-import gnunet.strings as strings
-
+from . import _Key
class EcdsaPublicKey(_Key):
__bits__ = 256
diff --git a/gnunet/dht.py b/gnunet/dht.py
index fc86e22..8e4ae85 100644
--- a/gnunet/dht.py
+++ b/gnunet/dht.py
@@ -2,10 +2,9 @@ import dbus
import datetime
-from gnunet import *
-from gnunet._dbus_utils import *
-
-import gnunet.block as block
+from . import *
+from . import block
+from ._dbus_utils import *
get_requests = {}
requests_lock = threading.Lock()
diff --git a/gnunet/gns.py b/gnunet/gns.py
index b2d5e64..f60fe63 100644
--- a/gnunet/gns.py
+++ b/gnunet/gns.py
@@ -1,10 +1,10 @@
import dbus
-from gnunet._dbus_utils import *
+from . import *
+from . import crypto
+from . import gnsrecord
-from gnunet import *
-import gnunet.crypto as crypto
-import gnunet.gnsrecord as gnsrecord
+from ._dbus_utils import *
def lookup(name, zone, record_type, only_cached):
diff --git a/gnunet/strings.py b/gnunet/strings.py
index 595c450..c84e32c 100644
--- a/gnunet/strings.py
+++ b/gnunet/strings.py
@@ -1,6 +1,6 @@
import datetime
-from gnunet import *
+from . import *
encTable = "0123456789ABCDEFGHIJKLMNOPQRSTUV"