Skip to content

Commit

Permalink
FIX: not refreshing file
Browse files Browse the repository at this point in the history
  • Loading branch information
9and3 committed Aug 21, 2024
1 parent 379e55a commit b74b48c
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions GH/PyGH/components/scriptsynccpy/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,21 +454,19 @@ def RunScript(self, select_file: bool, package_2_reload: str, x : int):
# set the path if button is pressed
self.init_script_path(select_file)



# file change listener thread
if self.path is not None:
if self.filechanged_thread_name not in [t.name for t in threading.enumerate()]:
FileChangedThread(self.path,
self.filechanged_thread_name
).start()
if self.filechanged_thread_name not in [t.name for t in threading.enumerate()]:
FileChangedThread(self.path,
self.filechanged_thread_name
).start()



# add to the globals all the input parameters of the component (the locals)
globals().update(locals())
# add to the globals all the input parameters of the component (the locals)
globals().update(locals())

# execute the external script
# execute the external script
if self.path is not None:
res = self.safe_exec(self.path, None, globals(), package_2_reload)
self.is_success = True

Expand Down

0 comments on commit b74b48c

Please sign in to comment.