ソースを参照

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 1年前
コミット
9474c44171
1個のファイルの変更3行の追加2行の削除
  1. +3
    -2
      codearchiver/cli.py

+ 3
- 2
codearchiver/cli.py ファイルの表示

@@ -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()

読み込み中…
キャンセル
保存