Skip to content

Commit

Permalink
Update pygtfs to upstream's 0.1.5 (#19151)
Browse files Browse the repository at this point in the history
This works by adding `?check_same_thread=False` to the sqlite
connection string, as suggested by robbiet480@.
It upgrades pygtfs from homeassitant's forked 0.1.3 version to 0.1.5.

Fixes #15725
  • Loading branch information
jarondl authored and fabaff committed Dec 9, 2018
1 parent 866c2ca commit a744dc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions homeassistant/components/sensor/gtfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from homeassistant.helpers.entity import Entity
import homeassistant.helpers.config_validation as cv

REQUIREMENTS = ['pygtfs-homeassistant==0.1.3.dev0']
REQUIREMENTS = ['pygtfs==0.1.5']

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -169,9 +169,9 @@ def setup_platform(hass, config, add_entities, discovery_info=None):

import pygtfs

split_file_name = os.path.splitext(data)
(gtfs_root, _) = os.path.splitext(data)

sqlite_file = "{}.sqlite".format(split_file_name[0])
sqlite_file = "{}.sqlite?check_same_thread=False".format(gtfs_root)
joined_path = os.path.join(gtfs_dir, sqlite_file)
gtfs = pygtfs.Schedule(joined_path)

Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ pygatt==3.2.0
pygogogate2==0.1.1

# homeassistant.components.sensor.gtfs
pygtfs-homeassistant==0.1.3.dev0
pygtfs==0.1.5

# homeassistant.components.remote.harmony
pyharmony==1.0.20
Expand Down

0 comments on commit a744dc2

Please sign in to comment.