Control: severity -1 normal

On 2021-10-08 15:24:56, Gabriel Filion wrote:
> Package: undertime
> Version: 2.6.0
> Severity: grave
> Justification: renders package unusable
>
> Hello,
>
> I'm currently getting stack traces consistently when using undertime. No 
> matter
> the timezone that I request, I get a stack trace with a TypeError exception:
>
> $ undertime pt
> Traceback (most recent call last):
>   File "/usr/bin/undertime", line 994, in <module>
>     main(args)
>   File "/usr/bin/undertime", line 733, in main
>     timezones += filter(None, [guess_zone(z) for z in args.timezones])
> TypeError: 'NoneType' object is not iterable
>
> $ undertime PST
> WARNING: date provided cannot be parsed: PST
> Traceback (most recent call last):
>   File "/usr/bin/undertime", line 994, in <module>
>     main(args)
>   File "/usr/bin/undertime", line 733, in main
>     timezones += filter(None, [guess_zone(z) for z in args.timezones])
> TypeError: 'NoneType' object is not iterable
>
> If I run that last command with pdb,
>
> e.g. python3 -m pdb /usb/bin/undertime PST
>
> and then (r)un the program until the error, I can see that args.timezones is
> set to None:
>
> (Pdb) type(args.timezones)
> <class 'NoneType'>
>
>
> now from there, I tried using "undertime -t PST" and that actually worked. So
> there must be something off with the default value to -t

I should have documented this possibly more clearly in the NEWS.Debian
file, or maybe make a 3.x release, but I changed the semantics of the
commandline arguments quite significantly. The arguments are now a time,
and you need to provide a -t (or add it to your config file) for
undertime to work.

I'll take this bug report as a request to improve the error message
and/or data structure. Really, args.timezones should be an empty list
instead of None here, I think.

A.

-- 
L'homme construit des maisons parce qu'il est vivant, mais il écrit des
livres parce qu'il se sait mortel.
                        - Daniel Pennac, Comme un roman

Reply via email to