Skip to content

Commit a27427f

Browse files
author
Chad Stryker
committed
Streamer.py: Changed the variable name async to use_async to avoid keyword collison / syntax error in Python 3.5 and later. Also, removed async variable from console_message string formatting (line 272).
1 parent 8313137 commit a27427f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ISStreamer/Streamer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Streamer:
4242
LocalFile = None
4343
ApiVersion = '<=0.0.4'
4444
MissedEvents = None
45-
def __init__(self, bucket_name="", bucket_key="", access_key="", ini_file_location=None, debug_level=0, buffer_size=10, offline=None, async=True):
45+
def __init__(self, bucket_name="", bucket_key="", access_key="", ini_file_location=None, debug_level=0, buffer_size=10, offline=None, use_async=True):
4646
config = configutil.getConfig(ini_file_location)
4747
if (offline != None):
4848
self.Offline = offline
@@ -52,7 +52,7 @@ def __init__(self, bucket_name="", bucket_key="", access_key="", ini_file_locati
5252
else:
5353
self.Offline = True
5454

55-
self.Async = async
55+
self.Async = use_async
5656
if (self.Offline):
5757
try:
5858
file_location = "{}.csv".format(config["offline_file"])
@@ -269,7 +269,7 @@ def __ship_buffer():
269269
if (not self.Offline):
270270
if (len(self.LogQueue) >= self.BufferSize):
271271
self.console_message("log: queue size approximately at or greater than buffer size, shipping!", level=10)
272-
self.console_message("log: async is {async}".format(async=self.Async))
272+
self.console_message("log: async is {}".format(self.Async))
273273
if (self.Async):
274274
self.console_message("log: spawning ship thread", level=3)
275275
t = threading.Thread(target=__ship_buffer)

0 commit comments

Comments
 (0)