Skip to content

Commit

Permalink
flake8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pnorbert committed Mar 26, 2024
1 parent d61ef2b commit ad37ad9
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions source/utils/adios_campaign_manager/adios2_campaign_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ def CheckCampaignStore(args):
def CheckLocalCampaignDir(args):
if not isdir(args.LocalCampaignDir):
print(
"ERROR: Shot campaign data '"
+ args.LocalCampaignDir
+ "' does not exist. Run this command where the code was executed.",
"ERROR: Shot campaign data '" +
args.LocalCampaignDir +
"' does not exist. Run this command where the code was executed.",
flush=True,
)
exit(1)
Expand Down Expand Up @@ -186,7 +186,8 @@ def AddDatasetToArchive(hostID: int, dirID: int, dataset: str, cur: sqlite3.Curs
)
rowID = curDS.lastrowid
# print(
# f"Inserted bpdataset {dataset} in database on host {hostID} in dir {dirID}, rowid = {rowID}"
# f"Inserted bpdataset {dataset} in database on host {hostID}"
# f" in dir {dirID}, rowid = {rowID}"
# )
return rowID

Expand Down Expand Up @@ -303,15 +304,15 @@ def Create(args: dict, cur: sqlite3.Cursor):
cur.execute("create table host" + "(hostname TEXT PRIMARY KEY, longhostname TEXT)")
cur.execute("create table directory" + "(hostid INT, name TEXT, PRIMARY KEY (hostid, name))")
cur.execute(
"create table bpdataset"
+ "(hostid INT, dirid INT, name TEXT, ctime INT"
+ ", PRIMARY KEY (hostid, dirid, name))"
"create table bpdataset" +
"(hostid INT, dirid INT, name TEXT, ctime INT" +
", PRIMARY KEY (hostid, dirid, name))"
)
cur.execute(
"create table bpfile"
+ "(bpdatasetid INT, name TEXT, compression INT, lenorig INT"
+ ", lencompressed INT, ctime INT, data BLOB"
+ ", PRIMARY KEY (bpdatasetid, name))"
"create table bpfile" +
"(bpdatasetid INT, name TEXT, compression INT, lenorig INT" +
", lencompressed INT, ctime INT, data BLOB" +
", PRIMARY KEY (bpdatasetid, name))"
)
Update(args, cur)

Expand Down Expand Up @@ -345,11 +346,11 @@ def Info(args: dict, cur: sqlite3.Cursor):
for dir in dirs:
print(f" dir = {dir[1]}")
res3 = cur.execute(
'select rowid, name, ctime from bpdataset where hostid = "'
+ str(host[0])
+ '" and dirid = "'
+ str(dir[0])
+ '"'
'select rowid, name, ctime from bpdataset where hostid = "' +
str(host[0]) +
'" and dirid = "' +
str(dir[0]) +
'"'
)
bpdatasets = res3.fetchall()
for bpdataset in bpdatasets:
Expand Down

0 comments on commit ad37ad9

Please sign in to comment.