fix xargs #7

Closed
opened 2026-02-18 22:28:26 +00:00 by smark · 2 comments
Owner
$ find . -iname "*.yml" | xargs composefmt
Traceback (most recent call last):
  File "/home/smark/.local/bin//composefmt", line 10, in <module>
    sys.exit(main())
             ~~~~^^
  File "/home/smark/git/git.smsvc.net/docker/composefmt/composefmt/cli.py", line 87, in main
    format_yaml(data, cfg.top_level_order, cfg.service_order)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/smark/git/git.smsvc.net/docker/composefmt/composefmt/cli.py", line 46, in format_yaml
    reorder_items(data, top_level_order)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/smark/git/git.smsvc.net/docker/composefmt/composefmt/cli.py", line 28, in reorder_items
    if key in data.keys():
              ^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'keys'

Vermutlich Ursache:

    # handle STDIN if present
    if not sys.stdin.isatty():
```bash $ find . -iname "*.yml" | xargs composefmt Traceback (most recent call last): File "/home/smark/.local/bin//composefmt", line 10, in <module> sys.exit(main()) ~~~~^^ File "/home/smark/git/git.smsvc.net/docker/composefmt/composefmt/cli.py", line 87, in main format_yaml(data, cfg.top_level_order, cfg.service_order) ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/smark/git/git.smsvc.net/docker/composefmt/composefmt/cli.py", line 46, in format_yaml reorder_items(data, top_level_order) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ File "/home/smark/git/git.smsvc.net/docker/composefmt/composefmt/cli.py", line 28, in reorder_items if key in data.keys(): ^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'keys' ``` Vermutlich Ursache: ```python # handle STDIN if present if not sys.stdin.isatty(): ```
Author
Owner

Selbes Problem tritt innerhalb eines Dockercontainers auf

Selbes Problem tritt innerhalb eines Dockercontainers auf
Author
Owner

closed by 2fdf788

closed by 2fdf788
smark closed this issue 2026-02-19 19:29:13 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
docker/composefmt#7
No description provided.