mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-16 01:42:55 +00:00
fixed python script
This commit is contained in:
@@ -5,14 +5,14 @@ index = {}
|
||||
os.chdir("control_files")
|
||||
for prefix in os.listdir("."):
|
||||
for file in os.listdir(prefix):
|
||||
with open(fname, "r") as f:
|
||||
ext_name = fname.replace(".control", "")
|
||||
with open(os.path.join(prefix, file), "r") as f:
|
||||
ext_name = file.replace(".control", "")
|
||||
control = f.read()
|
||||
index[ext_name] = {
|
||||
"path": f"{prefix}/{ext_name}.tar.gz",
|
||||
"control": control
|
||||
}
|
||||
|
||||
with open("control_index.json", "w") as f:
|
||||
with open("../control_index.json", "w") as f:
|
||||
json.dump(index, f)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user