pywebexec 1.3.5__tar.gz → 1.3.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. {pywebexec-1.3.5/pywebexec.egg-info → pywebexec-1.3.6}/PKG-INFO +1 -1
  2. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/pywebexec.py +5 -3
  3. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/version.py +2 -2
  4. {pywebexec-1.3.5 → pywebexec-1.3.6/pywebexec.egg-info}/PKG-INFO +1 -1
  5. {pywebexec-1.3.5 → pywebexec-1.3.6}/.github/workflows/python-publish.yml +0 -0
  6. {pywebexec-1.3.5 → pywebexec-1.3.6}/.gitignore +0 -0
  7. {pywebexec-1.3.5 → pywebexec-1.3.6}/LICENSE +0 -0
  8. {pywebexec-1.3.5 → pywebexec-1.3.6}/README.md +0 -0
  9. {pywebexec-1.3.5 → pywebexec-1.3.6}/pyproject.toml +0 -0
  10. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/__init__.py +0 -0
  11. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/static/css/Consolas NF.ttf +0 -0
  12. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/static/css/style.css +0 -0
  13. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/static/css/xterm.css +0 -0
  14. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/static/images/aborted.svg +0 -0
  15. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/static/images/copy.svg +0 -0
  16. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/static/images/copy_ok.svg +0 -0
  17. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/static/images/down-arrow.svg +0 -0
  18. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/static/images/failed.svg +0 -0
  19. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/static/images/favicon.svg +0 -0
  20. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/static/images/running.gif +0 -0
  21. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/static/images/success.svg +0 -0
  22. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/static/js/commands.js +0 -0
  23. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/static/js/script.js +0 -0
  24. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/static/js/xterm/LICENSE +0 -0
  25. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/static/js/xterm/ansi_up.min.js +0 -0
  26. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/static/js/xterm/xterm-addon-fit.js +0 -0
  27. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/static/js/xterm/xterm.js +0 -0
  28. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/templates/__init__.py +0 -0
  29. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec/templates/index.html +0 -0
  30. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec.egg-info/SOURCES.txt +0 -0
  31. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec.egg-info/dependency_links.txt +0 -0
  32. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec.egg-info/entry_points.txt +0 -0
  33. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec.egg-info/requires.txt +0 -0
  34. {pywebexec-1.3.5 → pywebexec-1.3.6}/pywebexec.egg-info/top_level.txt +0 -0
  35. {pywebexec-1.3.5 → pywebexec-1.3.6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.3.5
3
+ Version: 1.3.6
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
@@ -447,19 +447,21 @@ def run_command(command, params, command_id, user):
447
447
  with open(output_file_path, 'wb') as output_file:
448
448
  def read(fd):
449
449
  data = os.read(fd, 1024)
450
+ if not data: # Check for EOF
451
+ raise OSError("EOF reached")
450
452
  output_file.write(data)
451
453
  output_file.flush()
452
454
  return data
453
455
 
454
456
  def spawn_pty():
455
457
  pid, fd = pty.fork()
456
- if pid == 0: # children
458
+ if pid == 0: # Child process
457
459
  try:
458
460
  os.setsid()
459
461
  except:
460
462
  pass
461
463
  os.execvp(command, [command] + params)
462
- else:
464
+ else: # Parent process
463
465
  update_command_status(command_id, 'running', pid=pid, user=user)
464
466
  while True:
465
467
  try:
@@ -467,8 +469,8 @@ def run_command(command, params, command_id, user):
467
469
  except OSError:
468
470
  break
469
471
  (pid, status) = os.waitpid(pid, 0)
470
- print(status)
471
472
  return status
473
+
472
474
  status = spawn_pty()
473
475
  end_time = datetime.now().isoformat()
474
476
  # Update the status based on the result
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.3.5'
16
- __version_tuple__ = version_tuple = (1, 3, 5)
15
+ __version__ = version = '1.3.6'
16
+ __version_tuple__ = version_tuple = (1, 3, 6)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.3.5
3
+ Version: 1.3.6
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
File without changes
File without changes
File without changes
File without changes
File without changes