Skip to content

Commit

Permalink
Merge pull request GoogleCloudPlatform#232 from ocervell/gsuite-expor…
Browse files Browse the repository at this point in the history
…t-fix-timestamp

Fix timestamp when None
  • Loading branch information
ryanmcdowell authored Apr 8, 2019
2 parents 76a11ec + 87201f6 commit cfe92cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/gsuite-exporter/gsuite_exporter/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ def sync_all(

for app in applications:
last_ts = exporter.get_last_timestamp(app)
start_time = (parser.parse(last_ts) - timedelta(minutes=offset)).isoformat()
if last_ts is None:
start_time = None
else:
start_time = (parser.parse(last_ts) - timedelta(minutes=offset)).isoformat()
exporter_dest = exporter.get_destination(app)
logger.info(
"%s.%s --> %s (%s) [starting new sync] from %s (offset => %s mn)",
Expand Down

0 comments on commit cfe92cb

Please sign in to comment.