Skip to content

Commit

Permalink
Fix possible segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
FL550 committed Aug 22, 2024
1 parent d4b605b commit 1618b3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@

setuptools.setup(
name="simple_dwd_weatherforecast",
version="2.0.32",
version="2.0.33",
author="Max Fermor",
description="A simple tool to retrieve a weather forecast from DWD OpenData",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/FL550/simple_dwd_weatherforecast.git",
packages=setuptools.find_packages(),
package_data={'': ['stations.json', 'uv_stations.json']},
package_data={"": ["stations.json", "uv_stations.json"]},
include_package_data=True,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.6',
install_requires=['lxml','requests', 'Pillow', 'arrow']
python_requires=">=3.6",
install_requires=["lxml", "requests", "Pillow", "arrow"],
)
4 changes: 2 additions & 2 deletions simple_dwd_weatherforecast/dwdforecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,9 +752,9 @@ def parse_placemark(self, stream):
):
item = placemark.find(".//kml:name", namespaces=self.namespaces)

if item.text == self.station_id:
if item is not None and item.text == self.station_id:
return placemark
placemark.clear()
# placemark.clear()

def parse_issue_time(self, tree):
issue_time_new = arrow.get(
Expand Down

0 comments on commit 1618b3a

Please sign in to comment.