subunit/run.py: make iso8601 UTC usage python 2/3 compatible
authorJoe Guo <joeg@catalyst.net.nz>
Wed, 6 Mar 2019 23:34:15 +0000 (12:34 +1300)
committerNoel Power <npower@samba.org>
Thu, 7 Mar 2019 12:01:25 +0000 (12:01 +0000)
commit02c7b8c03d4970421a5170e44c57cbc3cda82827
tree1c7f7cdd3de4e8568c572be968ba17d4b091c78a
parent8b18da27cf261b0283fe66d2b827cab542488ac7
subunit/run.py: make iso8601 UTC usage python 2/3 compatible

In `iso8601/iso8601.py`:

    if sys.version_info >= (3, 2, 0):
        UTC = datetime.timezone.utc
        ...
    else:
        class Utc(datetime.tzinfo):
            ...

        UTC = Utc()

The class `Utc` is only available for python < 3.2.0.
Use `UTC` instance instead, which is python 2/3 compatible.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
python/samba/subunit/run.py