Skip to content

Commit f245eaa

Browse files
committed
Minor refactoring to hide strategy object from PDU
1 parent 2eb8cd1 commit f245eaa

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

smpplib/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ def __del__(self):
8888
@property
8989
def sequence(self):
9090
return self.sequence_strategy.sequence
91+
92+
def next_sequence(self):
93+
return self.sequence_strategy.next_sequence()
9194

9295
def connect(self):
9396
"""Connect to SMSC"""

smpplib/pdu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def _set_sequence(self, sequence):
7171

7272
def _next_seq(self):
7373
"""Return next sequence number"""
74-
return self._client.sequence_strategy.next_sequence()
74+
return self._client.next_sequence()
7575

7676
def is_vendor(self):
7777
"""Return True if this is a vendor PDU, False otherwise"""

0 commit comments

Comments
 (0)