Skip to content
Snippets Groups Projects
Commit 037c9b05 authored by Andre Sailer's avatar Andre Sailer Committed by sweeper
Browse files

Merge branch 'fixPylint' into 'master'

Fixes for new pylint version: getPlatform et al.

See merge request !2254

(cherry picked from commit f959b9dc)

19c70fbb getPlatform: fix possibly using before assignment
35e78c78 getNewRPMrevision: fix possibly using before assigment, cleanup imports
60870df9 copyRPMs: fix possibly used before assignment
06490cab getPlatform: fix CXXOPTIONS capitalisation
parent 1b3ebb2c
No related branches found
No related tags found
1 merge request!2261Sweeping !2254 from master to LCG_104-patches: Fixes for new pylint version: getPlatform et al.
Pipeline #7407656 passed
......@@ -3,11 +3,11 @@ from __future__ import print_function
from os import listdir
from os.path import isfile, join
import shutil
import sys
import os
from optparse import OptionParser
from common_parameters import officialarea, tmparea
import sys, errno
import errno
from subprocess import Popen
def copy_to_eos(from_, to, force=False):
......@@ -70,8 +70,9 @@ if __name__ == "__main__":
(options, args) = parser.parse_args()
if len(args) != 2:
parser.error("incorrect number of arguments.")
else:
localarea = args[0] #where RPMS have been build
target = args[1]
sys.exit(1)
localarea = args[0] # where RPMS have been build
target = args[1]
copyRPMS(localarea,tmparea,target=target)
......@@ -4,9 +4,9 @@ from __future__ import print_function
# This script looks into existing RPMS and gives the lowest not used RPM revision
from os import listdir
from os.path import isfile, join, isdir
import shutil
import os
from os.path import join, isdir
import sys
from optparse import OptionParser
import itertools
from common_parameters import officialarea
......@@ -31,8 +31,9 @@ if __name__ == "__main__":
(options, args) = parser.parse_args()
if len(args) != 2:
parser.error("incorrect number of arguments.")
else:
lcg_version = args[0] # lcg_version being built
platform = args[1] # platform being built for
sys.exit(1)
lcg_version = args[0] # lcg_version being built
platform = args[1] # platform being built for
print(get_new_RPM_revision(lcg_version,platform))
print(get_new_RPM_revision(lcg_version, platform))
......@@ -13,15 +13,9 @@ import distro # replacement of platform.linux_distribution https://github.com/ni
arch = platform.machine()
system = platform.system()
flagarch = 0
flagcxx=0
#---Determine external architecture and extra options----------------
if os.getenv('ARCHITECTURE'):
architecture = os.getenv('ARCHITECTURE')
flagarch = 1
if os.getenv('CXXOPTIONS'):
cxxoptions = os.getenv('cxxoptions')
flagcxx = 1
architecture = os.getenv('ARCHITECTURE', None)
cxxoptions = os.getenv('CXXOPTIONS', None)
#---Determine the OS and version--------------------------------------
if system == 'Darwin' :
if int(platform.mac_ver()[0].split('.')[0]) > 10 :
......@@ -107,11 +101,11 @@ if buildtype == 'Release' : bt = 'opt'
elif buildtype == 'Debug' : bt = 'dbg'
else : bt = 'unk'
if flagarch==1:
if architecture:
print('%s+%s-%s-%s-%s' % (arch, architecture, osvers, compiler, bt))
elif flagcxx==1:
elif cxxoptions:
print('%s+%s-%s-%s-%s' % (arch, cxxoptions, osvers, compiler, bt))
elif flagarch==1 and flagcxx==1:
elif architecture and cxxoptions: # we can never get here
print('%s+%s+%s-%s-%s-%s' % (arch, architecture, cxxoptions, osvers, compiler, bt))
else:
print('%s-%s-%s-%s' % (arch, osvers, compiler, bt))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment