From 933076434d5c59f524eaba356270032d2df6e3eb Mon Sep 17 00:00:00 2001 From: Ali Satwat Khan Date: Thu, 16 Jul 2026 03:44:44 +0500 Subject: [PATCH 1/2] Replaced print calls with logger --- shopify/resources/graphql.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/shopify/resources/graphql.py b/shopify/resources/graphql.py index 33525ef1..327ac299 100644 --- a/shopify/resources/graphql.py +++ b/shopify/resources/graphql.py @@ -1,8 +1,11 @@ +import logging import shopify from ..base import ShopifyResource from six.moves import urllib import json +logger = logging.getLogger(__name__) + class GraphQL: def __init__(self): @@ -27,6 +30,6 @@ def execute(self, query, variables=None, operation_name=None): response = urllib.request.urlopen(req) return response.read().decode("utf-8") except urllib.error.HTTPError as e: - print((e.read())) - print("") - raise e + body = e.read() + logger.error("GraphQL request failed: %s", body) + raise e \ No newline at end of file From 51352d54c1ae933a13481f16324970f882d5bf06 Mon Sep 17 00:00:00 2001 From: Ali Satwat Khan Date: Thu, 16 Jul 2026 03:46:05 +0500 Subject: [PATCH 2/2] added new line at the end --- shopify/resources/graphql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shopify/resources/graphql.py b/shopify/resources/graphql.py index 327ac299..846d11bc 100644 --- a/shopify/resources/graphql.py +++ b/shopify/resources/graphql.py @@ -32,4 +32,4 @@ def execute(self, query, variables=None, operation_name=None): except urllib.error.HTTPError as e: body = e.read() logger.error("GraphQL request failed: %s", body) - raise e \ No newline at end of file + raise e