From 0ac25c1a92413bac6a7dfcbbf561fb03bc830442 Mon Sep 17 00:00:00 2001 From: Sander Jonkers Date: Fri, 8 Jan 2021 13:52:04 +0100 Subject: [PATCH] Comment: module, and MiniSSDPd reference --- minissdpd/submit_to_minissdpd.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/minissdpd/submit_to_minissdpd.py b/minissdpd/submit_to_minissdpd.py index c5f6686..b1d6ccf 100755 --- a/minissdpd/submit_to_minissdpd.py +++ b/minissdpd/submit_to_minissdpd.py @@ -1,7 +1,8 @@ #!/usr/bin/env python3 # vim: sw=4 ts=4 expandtab # (c) 2021 Thomas BERNARD -# Python 3 : code sample +# Python3 module to submit service to running MiniSSDPd +# MiniSSDPd: See http://miniupnp.free.fr/minissdpd.html import socket, os @@ -11,7 +12,7 @@ def codelength(s): if not isinstance(s, bytes): # Not bytes. Let's try to convert to bytes, but only plain ASCII try: - s = str.encode(s,"ascii") + s = str.encode(s, "ascii") except: s = b'' l = len(s)