diff --git a/modules/Storycraft.py b/modules/Storycraft.py index 7492004..5535b2f 100644 --- a/modules/Storycraft.py +++ b/modules/Storycraft.py @@ -557,7 +557,9 @@ class Storycraft(Module): game.owner_nick = result['owner_nick'] game.owner_userhost = result['owner_userhost'] game.start_time = result['start_time'].replace(tzinfo=tzlocal()) - game.end_time = result['end_time'].replace(tzinfo=tzlocal()) + game.end_time = result['end_time'] + if game.end_time is not None: + game.end_time = game.end_time.replace(tzinfo=tzlocal()) return game except mdb.Error as e: @@ -864,7 +866,9 @@ class Storycraft(Module): game.owner_nick = result['owner_nick'] game.owner_userhost = result['owner_userhost'] game.start_time = result['start_time'].replace(tzinfo=tzlocal()) - game.end_time = result['end_time'].replace(tzinfo=tzlocal()) + game.end_time = result['end_time'] + if game.end_time is not None: + game.end_time = game.end_time.replace(tzinfo=tzlocal()) games.append(game) @@ -917,7 +921,9 @@ class Storycraft(Module): game.owner_nick = result['owner_nick'] game.owner_userhost = result['owner_userhost'] game.start_time = result['start_time'].replace(tzinfo=tzlocal()) - game.end_time = result['end_time'].replace(tzinfo=tzlocal()) + game.end_time = result['end_time'] + if game.end_time is not None: + game.end_time = game.end_time.replace(tzinfo=tzlocal()) games.append(game) @@ -957,7 +963,9 @@ class Storycraft(Module): game.owner_nick = result['owner_nick'] game.owner_userhost = result['owner_userhost'] game.start_time = result['start_time'].replace(tzinfo=tzlocal()) - game.end_time = result['end_time'].replace(tzinfo=tzlocal()) + game.end_time = result['end_time'] + if game.end_time is not None: + game.end_time = game.end_time.replace(tzinfo=tzlocal()) games.append(game)