Skip to content

Commit

Permalink
Cleanup: Remove unused helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
srenfo authored and glaslos committed Dec 6, 2020
1 parent a8247e8 commit f7ac7da
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions conpot/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,11 @@ def chr_py3(x):
return bytearray((x,))


# covert a number to an ascii byte string
def number_to_bytes(x):
return x if isinstance(x, bytes) else bytes(str(int(x)), encoding="ascii")


# convert a string to an ascii byte string
def str_to_bytes(x):
return x if isinstance(x, bytes) else str(x).encode("ascii")


# pack a short int
def pack_short_int(x):
return x if isinstance(x, bytes) else x.to_bytes(2, byteorder="big")


# unpack a short int
def unpack_short_int(x):
return int.from_bytes(x, byteorder="big")


months_map = {
1: "Jan",
2: "Feb",
Expand Down

0 comments on commit f7ac7da

Please sign in to comment.