From 0b9072aa2830a2c5245b0c2848e87272b989e277 Mon Sep 17 00:00:00 2001
From: Lubomir Bucek <lubomir.bucek@eox.at>
Date: Mon, 28 Sep 2020 18:39:13 +0200
Subject: [PATCH] python3 related fix

---
 core/registrar.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/core/registrar.py b/core/registrar.py
index 77be9987..63c6574a 100644
--- a/core/registrar.py
+++ b/core/registrar.py
@@ -66,7 +66,6 @@ from eoxserver.resources.coverages.registration.registrators.gdal import (
 
 logger = logging.getLogger(__name__)
 
-
 def setup_logging(verbosity):
     # start logging setup
     # get command line level
@@ -92,7 +91,7 @@ def setup_logging(verbosity):
 
 def set_gdal_swift_auth():
     # parsing command line output of swift auth
-    auth_keys = subprocess.check_output(["swift", "auth"]).split("\n")
+    auth_keys = subprocess.check_output(["swift", "auth"]).decode(sys.stdout.encoding).split("\n")
     storage_url = auth_keys[0].split("OS_STORAGE_URL=")[1]
     auth_token = auth_keys[1].split("OS_AUTH_TOKEN=")[1]
     # setting gdal config
@@ -138,7 +137,6 @@ def get_product_type_and_level(metadata_item):
         xp = '//gml:metaDataProperty/gsc:EarthObservationMetaData/eop:parentIdentifier/text()'
         parent_identifier = tree.xpath(xp, namespaces=root.nsmap)[0]
 
-        print("parent identifier --->", parent_identifier)
         if parent_identifier.endswith('Level_1'):
             level = 'Level_1'
         if parent_identifier.endswith('Level_3'):
@@ -211,7 +209,6 @@ def registrar(
             container=upload_container, options={"prefix": objects_prefix},
         )
         for page in list_parts_gen:
-            print(page)
             if page["success"]:
                 for item in page["listing"]:
                     if item["name"].endswith(".xml"):
-- 
GitLab