Remove unnecessary rewind after file open
All checks were successful
Test Agent / test-agent-run (push) Successful in 18s
All checks were successful
Test Agent / test-agent-run (push) Successful in 18s
This commit is contained in:
parent
eee4743d4d
commit
dbd6e88de8
@ -5,7 +5,7 @@ jobs:
|
|||||||
runs-on: arch-x86_64
|
runs-on: arch-x86_64
|
||||||
steps:
|
steps:
|
||||||
- name: Fetch the repository
|
- name: Fetch the repository
|
||||||
run: git clone --branch ${{ gitea.ref_name }} --depth 1 ${{ gitea.server_url }}/${{ gitea.repository }}
|
run: git clone --revision ${{ gitea.sha }} --depth 1 ${{ gitea.server_url }}/${{ gitea.repository }}
|
||||||
|
|
||||||
- name: Build containers
|
- name: Build containers
|
||||||
run: docker-compose -f docker-compose-test.yaml build
|
run: docker-compose -f docker-compose-test.yaml build
|
||||||
|
|||||||
@ -74,8 +74,10 @@ class FileDatasource:
|
|||||||
self._acc_reader = csv.reader(self._acc_f, skipinitialspace=True)
|
self._acc_reader = csv.reader(self._acc_f, skipinitialspace=True)
|
||||||
self._gps_reader = csv.reader(self._gps_f, skipinitialspace=True)
|
self._gps_reader = csv.reader(self._gps_f, skipinitialspace=True)
|
||||||
|
|
||||||
self._rewind_acc()
|
# File pointer is already at 0 right after open(), so no need to rewind here.
|
||||||
self._rewind_gps()
|
# Skip header row once.
|
||||||
|
next(self._acc_reader, None)
|
||||||
|
next(self._gps_reader, None)
|
||||||
|
|
||||||
def _close_files(self) -> None:
|
def _close_files(self) -> None:
|
||||||
for f in (self._acc_f, self._gps_f):
|
for f in (self._acc_f, self._gps_f):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user