Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Commit 1cc274c

Browse files
authored
1.0.2 - Traceback when no deliveryDate is found in shipment
### Fixed - Traceback when no deliveryDate is found in shipment
1 parent 6780e26 commit 1cc274c

4 files changed

Lines changed: 13 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## 1.0.2 - 2018-05-28
8+
### Fixed
9+
- Traceback when no deliveryDate is found in shipment
10+
711
## 1.0.1 - 2018-04-28
812
### Fixed
913
- Export custom exception

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
(Unofficial) Python wrapper for the PostNL API (Dutch Postal Services), which can be used to track packages and letter deliveries. You can use your [jouw.postnl.nl](http://jouw.postnl.nl) credentials to use the API.
33

44
## Quick test
5+
When installed:
6+
```python
7+
python -m postnl_api.test_postnl_api USERNAME PASSWORD
8+
```
9+
10+
Or running directly:
511
```python
612
test_postnl_api.py USERNAME PASSWORD
713
```

postnl_api/postnl_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@ def get_relevant_shipments(self):
236236
continue
237237

238238
# Check if package has been delivered today
239-
if shipment['status']['delivery']:
239+
if shipment['status']['delivery'] and \
240+
shipment['status']['delivery']['deliveryDate']:
240241
delivery_date = datetime.strptime(
241242
shipment['status']['delivery']['deliveryDate'][:19], "%Y-%m-%dT%H:%M:%S")
242243

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from setuptools import setup, find_packages
22

33
setup(name='postnl_api',
4-
version='1.0.1',
4+
version='1.0.2',
55
description='Python wrapper for the PostNL API, a way to track packages using their online portal',
66
url='https://github.com/imicknl/python-postnl-api',
77
author='Mick Vleeshouwer',

0 commit comments

Comments
 (0)