From 02f94a2b25aa5ff934136340c9e17ab8760240a1 Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Wed, 11 Sep 2024 14:57:07 +0200 Subject: [PATCH] style: imports ordering --- src/DIRAC/Core/LCG/GOCDBClient.py | 1 + .../Command/DowntimeCommand.py | 15 +++++++-------- .../test/Test_RSS_Command_GOCDBStatusCommand.py | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/DIRAC/Core/LCG/GOCDBClient.py b/src/DIRAC/Core/LCG/GOCDBClient.py index 233a77f1973..1293b490101 100644 --- a/src/DIRAC/Core/LCG/GOCDBClient.py +++ b/src/DIRAC/Core/LCG/GOCDBClient.py @@ -10,6 +10,7 @@ from xml.dom import minidom import requests + from DIRAC import S_ERROR, S_OK, gLogger from DIRAC.Core.Security.Locations import getCAsLocation diff --git a/src/DIRAC/ResourceStatusSystem/Command/DowntimeCommand.py b/src/DIRAC/ResourceStatusSystem/Command/DowntimeCommand.py index 6b5571ec473..3f4f54e7f6d 100644 --- a/src/DIRAC/ResourceStatusSystem/Command/DowntimeCommand.py +++ b/src/DIRAC/ResourceStatusSystem/Command/DowntimeCommand.py @@ -4,26 +4,25 @@ GOCDB downtimes that are modified or deleted are also synced. """ import re -from urllib.error import URLError from datetime import datetime, timedelta from operator import itemgetter +from urllib.error import URLError -from DIRAC import S_OK, S_ERROR, gConfig -from DIRAC.Core.LCG.GOCDBClient import GOCDBClient -from DIRAC.Core.Utilities.SiteSEMapping import getSEHosts, getStorageElementsHosts +from DIRAC import S_ERROR, S_OK, gConfig from DIRAC.ConfigurationSystem.Client.Helpers.Path import cfgPath from DIRAC.ConfigurationSystem.Client.Helpers.Resources import ( + getCESiteMapping, getFTS3Servers, + getGOCFTSName, getGOCSiteName, getGOCSites, - getGOCFTSName, - getCESiteMapping, ) +from DIRAC.Core.LCG.GOCDBClient import GOCDBClient +from DIRAC.Core.Utilities.SiteSEMapping import getSEHosts, getStorageElementsHosts from DIRAC.Resources.Storage.StorageElement import StorageElement from DIRAC.ResourceStatusSystem.Client.ResourceManagementClient import ResourceManagementClient from DIRAC.ResourceStatusSystem.Command.Command import Command - # conversion from DIRAC resource type to GOCDB service type diracToGOC_conversion = { # Computing elements @@ -146,7 +145,7 @@ def _prepareCommand(self): else: elementName = gocSite["Value"] - # The DIRAC se names mean nothing on the grid, but their hosts and service types do mean. + # The DIRAC SE names mean nothing on the grid, but their hosts and service types do mean. elif elementType == "StorageElement": # Get the SE object and its protocols try: diff --git a/src/DIRAC/ResourceStatusSystem/Command/test/Test_RSS_Command_GOCDBStatusCommand.py b/src/DIRAC/ResourceStatusSystem/Command/test/Test_RSS_Command_GOCDBStatusCommand.py index 35665e3029e..c64da8eeed8 100644 --- a/src/DIRAC/ResourceStatusSystem/Command/test/Test_RSS_Command_GOCDBStatusCommand.py +++ b/src/DIRAC/ResourceStatusSystem/Command/test/Test_RSS_Command_GOCDBStatusCommand.py @@ -1,11 +1,11 @@ """ Test_RSS_Command_GOCDBStatusCommand """ from datetime import datetime, timedelta - from unittest import mock + import pytest -from DIRAC import gLogger, S_OK +from DIRAC import S_OK, gLogger from DIRAC.ResourceStatusSystem.Command.DowntimeCommand import DowntimeCommand """