From 57f21d355b36d382a76020a6bff82ecf986d3df2 Mon Sep 17 00:00:00 2001 From: Fabrice Le Goff <fabrice.le.goff@cern.ch> Date: Wed, 30 Oct 2019 17:43:59 +0100 Subject: [PATCH] fix fake pylint errors: pylint confused by futurize magic --- ProductionTools/ddm.test.py | 3 +-- ProductionTools/ddmtiming.test.py | 2 +- Script/cs/Threads/DdmMonitoringThread.py | 2 +- Script/cs/Threads/DeleteThread.py | 10 +++++----- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ProductionTools/ddm.test.py b/ProductionTools/ddm.test.py index 303684e..6397c14 100755 --- a/ProductionTools/ddm.test.py +++ b/ProductionTools/ddm.test.py @@ -4,7 +4,7 @@ from __future__ import print_function from future import standard_library standard_library.install_aliases() from builtins import str -import urllib.request, urllib.error, urllib.parse +import urllib.request, urllib.error, urllib.parse #pylint: disable=import-error import json import uuid from time import time @@ -43,4 +43,3 @@ except IOError as exc: print('ioerror:', str(exc), exc.errno, exc.strerror, exc.filename) except Exception as exc: print('error:', str(exc)) - diff --git a/ProductionTools/ddmtiming.test.py b/ProductionTools/ddmtiming.test.py index bbe3785..92e8aaf 100755 --- a/ProductionTools/ddmtiming.test.py +++ b/ProductionTools/ddmtiming.test.py @@ -7,7 +7,7 @@ standard_library.install_aliases() from builtins import str from builtins import range from past.utils import old_div -import urllib.request, urllib.error, urllib.parse +import urllib.request, urllib.error, urllib.parse #pylint: disable=import-error import json import uuid from time import time diff --git a/Script/cs/Threads/DdmMonitoringThread.py b/Script/cs/Threads/DdmMonitoringThread.py index 2736c49..917d7e9 100644 --- a/Script/cs/Threads/DdmMonitoringThread.py +++ b/Script/cs/Threads/DdmMonitoringThread.py @@ -3,7 +3,7 @@ from future import standard_library standard_library.install_aliases() from builtins import str import threading -import urllib.request, urllib.error, urllib.parse +import urllib.request, urllib.error, urllib.parse #pylint: disable=import-error import json import queue import time diff --git a/Script/cs/Threads/DeleteThread.py b/Script/cs/Threads/DeleteThread.py index e2d0a09..cb2e272 100644 --- a/Script/cs/Threads/DeleteThread.py +++ b/Script/cs/Threads/DeleteThread.py @@ -12,7 +12,7 @@ from itertools import chain import cs.Tools.Constants as Constants from cs.Tools.utils import thread_id_string from cs.Tools.LogConfig import enable_file_logging -from functools import reduce +from functools import reduce #pylint: disable=redefined-builtin class DeleteThread(threading.Thread): @@ -27,7 +27,7 @@ class DeleteThread(threading.Thread): self.DeleteQueue = DeleteQueue self.ClearQueue = ClearQueue self.files_deleted = 0 - + ##### Get configuration parameters ##### self.lockFile = self.conf.lockFile @@ -109,7 +109,7 @@ class DeleteThread(threading.Thread): fsInfo = self.getFSsize() while not self.exitFlag: - + if self.DeleteQueue.qsize() == 0: self.logger.debug('DeleteQueue is empty') self.event.wait(self.DeleteTimeout) @@ -119,7 +119,7 @@ class DeleteThread(threading.Thread): ##### Get file to be deleted from DeleteQueue ##### ##### deletefile is a list of (.COPIED file, Castor pool, Castor copy directory, Castor stage host) ##### deletefile = self.DeleteQueue.get(0) - + #deletefile = self.DeleteQueue.get() #block until room is available in the queue ????? self.logger.debug('Get file %s from DeleteQueue', deletefile[0]) @@ -241,7 +241,7 @@ class DeleteThread(threading.Thread): if not self.checkMigrationTimeout(filename): self.logger.debug('Last check for file to be migrated was too recent: do not delete') self.DeleteQueue.put(deletefile) - + self.event.wait(self.DeleteTimeout) continue # end if -- GitLab