Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
fail-fast: false
matrix:
python:
- 2.7.18
- 3.6.15
- 3.9.17

Expand Down Expand Up @@ -55,7 +54,6 @@ jobs:
fail-fast: false
matrix:
python:
- 2.7.18
- 3.6.15
- 3.9.17

Expand All @@ -82,7 +80,6 @@ jobs:
fail-fast: false
matrix:
python:
- 2.7.18
- 3.6.15
- 3.9.17

Expand Down
4 changes: 0 additions & 4 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,3 @@ dummy-variables=_
disable=
invalid-name,
line-too-long, # would be nice to remove this one
consider-using-f-string, # python2/3 support
unspecified-encoding, # python2/3 support
super-with-arguments, # python2/3 support
redefined-builtin, # python2/3 support
Empty file removed Pilot/__init__.py
Empty file.
33 changes: 8 additions & 25 deletions Pilot/dirac-pilot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,19 @@
But, as said, all the actions are actually configurable.
"""

from __future__ import absolute_import, division, print_function

import os
import sys
import time
from io import StringIO

############################
# python 2 -> 3 "hacks"

try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
from pilotTools import (
Logger,
PilotParams,
RemoteLogger,
getCommand,
pythonPathCheck,
)

try:
from Pilot.pilotTools import (
Logger,
PilotParams,
RemoteLogger,
getCommand,
pythonPathCheck,
)
except ImportError:
from pilotTools import (
Logger,
PilotParams,
RemoteLogger,
getCommand,
pythonPathCheck,
)
############################

if __name__ == "__main__":
Expand Down
50 changes: 12 additions & 38 deletions Pilot/pilotCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ def __init__(self, pilotParams):
execution.
"""

from __future__ import absolute_import, division, print_function

import filecmp
import os
import platform
Expand All @@ -28,39 +26,18 @@ def __init__(self, pilotParams):
import sys
import time
import traceback
import subprocess
from collections import Counter
from http.client import HTTPSConnection
from shlex import quote

from pilotTools import (
CommandBase,
getSubmitterInfo,
retrieveUrlTimeout,
safe_listdir,
sendMessage,
)

############################
# python 2 -> 3 "hacks"
try:
# For Python 3.0 and later
from http.client import HTTPSConnection
except ImportError:
# Fall back to Python 2
from httplib import HTTPSConnection

try:
from shlex import quote
except ImportError:
from pipes import quote

try:
from Pilot.pilotTools import (
CommandBase,
getSubmitterInfo,
retrieveUrlTimeout,
safe_listdir,
sendMessage,
)
except ImportError:
from pilotTools import (
CommandBase,
getSubmitterInfo,
retrieveUrlTimeout,
safe_listdir,
sendMessage,
)
############################


Expand Down Expand Up @@ -283,7 +260,7 @@ def _getPreinstalledEnvScript(self):
self.pp.installEnv["DIRAC_RC_PATH"] = preinstalledEnvScript

def _localInstallDIRAC(self):
"""Install python3 version of DIRAC client"""
"""Install DIRAC client"""

self.log.info("Installing DIRAC locally")

Expand All @@ -296,10 +273,7 @@ def _localInstallDIRAC(self):

# 1. Get the DIRACOS installer name
# curl -O -L https://github.com/DIRACGrid/DIRACOS2/releases/latest/download/DIRACOS-Linux-$(uname -m).sh
try:
machine = os.uname().machine # py3
except AttributeError:
machine = os.uname()[4] # py2
machine = os.uname().machine

installerName = "DIRACOS-Linux-%s.sh" % machine

Expand Down
Loading
Loading