Skip to content

Commit

Permalink
[py3] src/python/Databases suports py2 and py3 (#6828)
Browse files Browse the repository at this point in the history
  • Loading branch information
mapellidario authored Nov 3, 2021
1 parent f47285b commit 78f22c3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
3 changes: 1 addition & 2 deletions obsolete/Databases/FileMetaDataDB/MySQL/Destroy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""
import threading
import string

from WMCore.Database.DBCreator import DBCreator
from Databases.FileMetaDataDB.Oracle.Create import Create
Expand All @@ -29,6 +28,6 @@ def __init__(self, logger = None, dbi = None, param=None):
i = 0
for tableName in orderedTables:
i += 1
prefix = string.zfill(i, 2)
prefix = str(i).zfill(2)
self.create[prefix + tableName] = "DROP TABLE %s" % tableName

3 changes: 1 addition & 2 deletions obsolete/Databases/FileTransfersDB/MySQL/Destroy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""
import threading
import string

from WMCore.Database.DBCreator import DBCreator
from Databases.TaskDB.Oracle.Create import Create
Expand All @@ -29,5 +28,5 @@ def __init__(self, logger = None, dbi = None, param=None):
i = 0
for tableName in orderedTables:
i += 1
prefix = string.zfill(i, 2)
prefix = str(i).zfill(2)
self.create[prefix + tableName] = "DROP TABLE %s" % tableName
3 changes: 1 addition & 2 deletions obsolete/Databases/TaskDB/MySQL/Destroy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""
import threading
import string

from WMCore.Database.DBCreator import DBCreator
from Databases.TaskDB.Oracle.Create import Create
Expand All @@ -29,5 +28,5 @@ def __init__(self, logger = None, dbi = None, param=None):
i = 0
for tableName in orderedTables:
i += 1
prefix = string.zfill(i, 2)
prefix = str(i).zfill(2)
self.create[prefix + tableName] = "DROP TABLE %s" % tableName
3 changes: 1 addition & 2 deletions src/python/Databases/FileMetaDataDB/Oracle/Destroy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""
import threading
import string

from WMCore.Database.DBCreator import DBCreator
from Databases.FileMetaDataDB.Oracle.Create import Create
Expand All @@ -29,6 +28,6 @@ def __init__(self, logger = None, dbi = None, param=None):
i = 0
for tableName in orderedTables:
i += 1
prefix = string.zfill(i, 2)
prefix = str(i).zfill(2)
self.create[prefix + tableName] = "DROP TABLE %s" % tableName

3 changes: 1 addition & 2 deletions src/python/Databases/FileTransfersDB/Oracle/Destroy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""
import threading
import string

from WMCore.Database.DBCreator import DBCreator
from Databases.TaskDB.Oracle.Create import Create
Expand All @@ -29,7 +28,7 @@ def __init__(self, logger = None, dbi = None, param=None):
i = 0
for tableName in orderedTables:
i += 1
prefix = string.zfill(i, 2)
prefix = str(i).zfill(2)
if tableName.endswith("_seq"):
self.create[prefix + tableName] = "DROP SEQUENCE %s" % tableName
elif tableName.endswith("_trg"):
Expand Down
3 changes: 1 addition & 2 deletions src/python/Databases/TaskDB/Oracle/Destroy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""
import threading
import string

from WMCore.Database.DBCreator import DBCreator
from Databases.TaskDB.Oracle.Create import Create
Expand All @@ -29,7 +28,7 @@ def __init__(self, logger = None, dbi = None, param=None):
i = 0
for tableName in orderedTables:
i += 1
prefix = string.zfill(i, 2)
prefix = str(i).zfill(2)
if tableName.endswith("_seq"):
self.create[prefix + tableName] = "DROP SEQUENCE %s" % tableName
elif tableName.endswith("_trg"):
Expand Down

0 comments on commit 78f22c3

Please sign in to comment.