From 8a41ef327237221f3605dd16ff91a3b36d41236f Mon Sep 17 00:00:00 2001 From: The Z <1020111+farirat@users.noreply.github.com> Date: Tue, 7 Nov 2023 15:23:47 +0100 Subject: [PATCH] avoiding imports from inside code for better readability and to allow any import error to raise early. --- jasmin/protocols/cli/mtinterceptorm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jasmin/protocols/cli/mtinterceptorm.py b/jasmin/protocols/cli/mtinterceptorm.py index 0081ffb9..ae734351 100644 --- a/jasmin/protocols/cli/mtinterceptorm.py +++ b/jasmin/protocols/cli/mtinterceptorm.py @@ -2,6 +2,7 @@ import re import inspect import pickle +import urllib.parse, urllib.request, urllib.error from jasmin.protocols.cli.managers import PersistableManager, Session from jasmin.protocols.cli.filtersm import MTFILTERS from jasmin.routing.jasminApi import MTInterceptorScript @@ -133,7 +134,6 @@ def parse_args_and_call_with_instance(self, *args, **kwargs): stype, script_path = validate_typed_script(arg) if stype == 'python3': - import urllib.parse, urllib.request, urllib.error pathscheme = urllib.parse.urlparse(script_path).scheme if pathscheme == '': # Open file and get its content