Explorar el Código

Ensure that FD 3 gets closed

It appears that Python doesn't reliably (or maybe just doesn't at all) flush and close non-standard FDs on exit. This randomly caused the artefacts list to get lost to /dev/null.
tags/v1.1
JustAnotherArchivist hace 1 año
padre
commit
9474c44171
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. +3
    -2
      codearchiver/cli.py

+ 3
- 2
codearchiver/cli.py Ver fichero

@@ -206,8 +206,9 @@ def main():
if args.writeArtefactsFd3:
with storage.lock():
artefacts = storage.list_new_files()
for filename in artefacts:
print(filename, file = artefactsFd)
with artefactsFd:
for filename in artefacts:
print(filename, file = artefactsFd)

if __name__ == '__main__':
main()

Cargando…
Cancelar
Guardar