Skip to content

Commit 0b3355c

Browse files
author
Nathan Lee
committed
Updated the template driver to comply with multiprocessing changes in python3.8. Fixed context.keys() to properly return dictionary keys.
1 parent 2af60c9 commit 0b3355c

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

pyrunner/core/constants.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@
3838
import os, sys
3939
from pyrunner import PyRunner
4040
41-
# Determine absolute path of this file's parent directory at runtime
42-
abs_dir_path = os.path.dirname(os.path.realpath(__file__))
43-
44-
# Store path to default config and .lst file
45-
config_file = '{{}}/config/app_profile'.format(abs_dir_path)
46-
proc_file = '{{}}/config/{app_name}.lst'.format(abs_dir_path)
47-
48-
# Init PyRunner and assign default config and .lst file
49-
app = PyRunner(config_file=config_file, proc_file=proc_file)
50-
5141
if __name__ == '__main__':
42+
# Determine absolute path of this file's parent directory at runtime
43+
abs_dir_path = os.path.dirname(os.path.realpath(__file__))
44+
45+
# Store path to default config and .lst file
46+
config_file = '{{}}/config/app_profile'.format(abs_dir_path)
47+
proc_file = '{{}}/config/{app_name}.lst'.format(abs_dir_path)
48+
49+
# Init PyRunner and assign default config and .lst file
50+
app = PyRunner(config_file=config_file, proc_file=proc_file)
51+
5252
# Initiate job and exit driver with return code
5353
sys.exit(app.execute())
5454
"""

pyrunner/core/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def shared_queue(self):
7777

7878
@property
7979
def keys(self):
80-
return [x for x in self._shared_dict]
80+
return self._shared_dict.keys()
8181

8282
def has_key(self, key):
8383
return key in self._shared_dict

pyrunner/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '5.1.1'
1+
__version__ = '5.1.2'

0 commit comments

Comments
 (0)