CLI errors when redirecting the output to a file

Bug #1996065 reported by Alexsander de Souza
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Alexsander de Souza

Bug Description

Using MAAS 3.3.0-beta2, when redirecting the CLI output to a file, we get this error:

$ maas admin machines read > test.list
usage: maas [-h] COMMAND ...

options:
  -h, --help show this help message and exit

drill down:
  COMMAND
    login Log in to a remote API, and remember its description and
                  credentials.
    logout Log out of a remote API, purging any stored credentials.
    list List remote APIs that have been logged-in to.
    refresh Refresh the API descriptions of all profiles.
    init Initialize controller.
    apikey Used to manage a user's API keys. Shows existing keys unless
                  --generate or --delete is passed.
    configauth Configure external authentication.
    config-tls Configure MAAS Region TLS.
    config-vault (placeholder) Configure MAAS Region Vault integration.
    createadmin Create a MAAS administrator account.
    changepassword
                  Change a MAAS user's password.
    admin Interact with http://10.10.0.31:5240/MAAS/api/2.0/

https://maas.io/

cannot use a string pattern on a bytes-like object

The location of the file doesn't change the results, even writing to /dev/null errors. Using a pipe (|) instead of redirection also errors. Calling the command without redirections work as expected.

Related branches

Changed in maas:
status: New → Triaged
Revision history for this message
Anton Troyanov (troyanov) wrote :

It seems to work for the snap version (3.3.0~beta1-12847-g.2e1950694)

Changed in maas:
assignee: nobody → Alexsander de Souza (alexsander-souza)
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: 3.3.0 → 3.3.0-beta3
Changed in maas:
status: Fix Committed → Fix Released
Changed in maas:
status: Fix Released → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.