Comment 1 for bug 2067503

Revision history for this message
Anton Troyanov (troyanov) wrote :

Hi Andrew,

Can you please try to apply the following change in src/maascli/cli.py?

         parser.add_argument(
             "--cacerts",
             help="Certificate CA file in PEM format",
- type=argparse.FileType(),
+ type=argparse.FileType('r', encoding='UTF-8'),
         )

The easiest way to test it would be:

> cd /tmp
> cp /snap/maas/current/lib/python3.10/site-packages/maascli/cli.py .
> sudo mount -o bind,ro /tmp/cli.py /snap/maas/current/lib/python3.10/site-packages/maascli/cli.py
> sudo snap restart maas