mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 07:41:32 +00:00
Fix python3.7 incompatibilities in SnapshotProvider
This commit is contained in:
parent
3fee8fee20
commit
3d2e3e7db3
@ -8,6 +8,8 @@ from os.path import isdir
|
||||
from datetime import datetime
|
||||
from uuid import uuid4
|
||||
|
||||
from dateutil import parser as dateparser
|
||||
|
||||
|
||||
class SnapshotProvider:
|
||||
def __init__(self, directory, git_dir):
|
||||
@ -109,7 +111,7 @@ class SnapshotProvider:
|
||||
self._snapshot()
|
||||
|
||||
def _checkout_new_branch_from_head(self):
|
||||
branch_name = uuid4()
|
||||
branch_name = str(uuid4())
|
||||
self._run((
|
||||
'git', 'branch',
|
||||
branch_name
|
||||
@ -174,7 +176,7 @@ class SnapshotProvider:
|
||||
commit_hash, timestamp = line.split('@')
|
||||
commits.append({
|
||||
'hash': commit_hash,
|
||||
'timestamp': datetime.fromisoformat(timestamp)
|
||||
'timestamp': dateparser.parse(timestamp)
|
||||
})
|
||||
|
||||
return commits
|
||||
|
Loading…
Reference in New Issue
Block a user