Skip to content

Commit

Permalink
fix setting of default user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
n0emis committed Mar 29, 2023
1 parent 88d7485 commit f6ce6b3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Changelog

.. contents::

v0.3.1
------
* [BUG] Fix setting of default user agent

v0.3.0
------
* [FEATURE] Add timezone awareness to all datetime time objects
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
author = 'n0emis, em0lar'

# The full version, including alpha/beta/rc tags
release = '0.3.0'
release = '0.3.1'


# -- General configuration ---------------------------------------------------
Expand Down
7 changes: 5 additions & 2 deletions pyhafas/profile/base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,8 @@ class BaseProfile(
availableProducts: Dict[str, List[int]] = {}
defaultProducts: List[str] = []

def __init__(self, ua=defaultUserAgent):
self.userAgent = ua
def __init__(self, ua=None):
if ua:
self.userAgent = ua
else:
self.userAgent = self.defaultUserAgent
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

setup(
name='pyhafas',
version='0.3.0',
version='0.3.1',
description='Python client for HAFAS public transport APIs',
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit f6ce6b3

Please sign in to comment.