Skip to content

Commit

Permalink
Removing catch of UnboundLocalError exception
Browse files Browse the repository at this point in the history
The previous commit added an exception catch for
UnboundLocalError because regression testing
revealed a failure in handling the Asia/Jerusalem
timezone. This timezone uses the version 3 data
format. A new issue MythTV#672 was opened to ask for
support for version 3. Since that issue has now
been fixed, we no longer need to catch
UnboundLocalError.

Refs: MythTV#654
  • Loading branch information
SteveErl committed Dec 3, 2022
1 parent 5490e48 commit c33737b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions mythtv/programs/scripts/metadata/Television/tvmaze.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,8 @@ def buildNumbers(args, opts):
else:
show_tz = None
dtInTgtZone = dtInLocalZone.astimezone(posixtzinfo(show_tz))
# For at least one timezone, the following exception may be thrown.
# UnboundLocalError: local variable 'ttmfmt' referenced before assignment
# Example: tvmaze.py --debug -N "The Masked Singer" "2022-11-24 19:00:00"

except (ValueError, AttributeError, UnboundLocalError) as e:
except (ValueError, AttributeError) as e:
if opts.debug:
print('show_tz =%s, except = %s' % (show_tz, e))
dtInTgtZone = None
Expand Down

0 comments on commit c33737b

Please sign in to comment.