Skip to content

Commit 693ce14

Browse files
committed
fix: getting most of py2 code out of WMS
1 parent 78307a5 commit 693ce14

File tree

75 files changed

+45
-331
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+45
-331
lines changed

src/DIRAC/Core/Base/AgentModule.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,8 @@ class AgentModule:
6767
def __init__(self, agentName, loadName, baseAgentName=False, properties={}):
6868
"""
6969
Common __init__ method for all Agents.
70-
All Agent modules must define:
71-
__doc__
72-
__RCSID__
70+
All Agent modules must define: __doc__
71+
7372
They are used to populate __codeProperties
7473
7574
The following Options are used from the Configuration:

src/DIRAC/Core/Base/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +0,0 @@
1-
from __future__ import absolute_import
2-
from __future__ import division
3-
from __future__ import print_function
4-
5-
__RCSID__ = "$Id$"

src/DIRAC/WorkloadManagementSystem/Agent/CloudDirector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class CloudDirector(AgentModule):
2929
"""
3030

3131
def __init__(self, *args, **kwargs):
32-
super(CloudDirector, self).__init__(*args, **kwargs)
32+
super().__init__(*args, **kwargs)
3333
self.vmTypeDict = {}
3434
self.vmTypeCECache = {}
3535
self.vmTypeSlots = {}

src/DIRAC/WorkloadManagementSystem/Agent/PilotSyncAgent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class PilotSyncAgent(AgentModule):
2525

2626
def __init__(self, *args, **kwargs):
2727
"""c'tor"""
28-
super(PilotSyncAgent, self).__init__(*args, **kwargs)
28+
super().__init__(*args, **kwargs)
2929

3030
# This location would be enough if we are running this agent on the DIRAC web server
3131
# '/opt/dirac/webRoot/www/pilot'

src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class SiteDirector(AgentModule):
5151

5252
def __init__(self, *args, **kwargs):
5353
"""c'tor"""
54-
super(SiteDirector, self).__init__(*args, **kwargs)
54+
super().__init__(*args, **kwargs)
5555

5656
# on-the fly imports
5757
ol = ObjectLoader()

src/DIRAC/WorkloadManagementSystem/Agent/StalledJobAgent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class StalledJobAgent(AgentModule):
3333

3434
def __init__(self, *args, **kwargs):
3535
"""c'tor"""
36-
super(StalledJobAgent, self).__init__(*args, **kwargs)
36+
super().__init__(*args, **kwargs)
3737

3838
self.jobDB = None
3939
self.logDB = None
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
"""
22
DIRAC.WorkloadManagementSystem.Agent package
33
"""
4-
from __future__ import absolute_import
5-
from __future__ import division
6-
from __future__ import print_function
7-
8-
__RCSID__ = "$Id$"

src/DIRAC/WorkloadManagementSystem/Client/JobManagerClient.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
""" Class that contains client access to the JobManager handler. """
22

3-
from __future__ import absolute_import
4-
from __future__ import division
5-
from __future__ import print_function
6-
73
from DIRAC.Core.Base.Client import Client, createClient
84

95

@@ -20,7 +16,7 @@ def __init__(self, url=None, **kwargs):
2016
:param kwargs: forwarded to the Base Client class
2117
"""
2218

23-
super(JobManagerClient, self).__init__(**kwargs)
19+
super().__init__(**kwargs)
2420

2521
if not url:
2622
self.serverURL = "WorkloadManagement/JobManager"

src/DIRAC/WorkloadManagementSystem/Client/JobMonitoringClient.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
""" Class that contains client access to the job monitoring handler. """
22

3-
from __future__ import absolute_import
4-
from __future__ import division
5-
from __future__ import print_function
6-
7-
__RCSID__ = "$Id$"
8-
93
from DIRAC.Core.Base.Client import Client, createClient
104
from DIRAC.Core.Utilities.DEncode import ignoreEncodeWarning
115
from DIRAC.Core.Utilities.JEncode import strToIntDict
@@ -16,7 +10,7 @@
1610
class JobMonitoringClient(Client):
1711
def __init__(self, **kwargs):
1812

19-
super(JobMonitoringClient, self).__init__(**kwargs)
13+
super().__init__(**kwargs)
2014
self.setServer("WorkloadManagement/JobMonitoring")
2115

2216
@ignoreEncodeWarning

src/DIRAC/WorkloadManagementSystem/Client/JobReport.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
""" JobReport class encapsulates various methods of the job status reporting.
22
It's an interface to JobStateUpdateClient, used when bulk submission is needed.
33
"""
4-
5-
from __future__ import print_function
6-
from __future__ import absolute_import
7-
from __future__ import division
8-
94
from collections import defaultdict
105

116
from DIRAC import S_OK, S_ERROR, gLogger
127
from DIRAC.Core.Utilities import Time, DEncode
138
from DIRAC.RequestManagementSystem.Client.Operation import Operation
149
from DIRAC.WorkloadManagementSystem.Client.JobStateUpdateClient import JobStateUpdateClient
1510

16-
__RCSID__ = "$Id$"
17-
1811

19-
class JobReport(object):
12+
class JobReport:
2013
"""
2114
.. class:: JobReport
2215
"""

0 commit comments

Comments
 (0)