pywebexec 1.3.5__py3-none-any.whl → 1.3.6__py3-none-any.whl

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.
pywebexec/pywebexec.py CHANGED
@@ -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
pywebexec/version.py CHANGED
@@ -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
@@ -1,6 +1,6 @@
1
1
  pywebexec/__init__.py,sha256=4spIsVaF8RJt8S58AG_wWoORRNkws9Iwqprj27C3ljM,99
2
- pywebexec/pywebexec.py,sha256=zZRaHVUoWqX6IHCesfrboCjcjKGYnOq3jZpos7h9JEI,26333
3
- pywebexec/version.py,sha256=FcYWgM5oYgqvidiF8nHnDFf0uLGibSe_Bdaq7MY6S4U,411
2
+ pywebexec/pywebexec.py,sha256=OUpyU7X275eVA-yn8coUsfN1vKaXvfxaPczeo-rEzrg,26419
3
+ pywebexec/version.py,sha256=d5ulHSpHe8PYDRupuj0qHnCpT54pR8sMjv17y0ht5fs,411
4
4
  pywebexec/static/css/Consolas NF.ttf,sha256=DJEOzF0eqZ-kxu3Gs_VE8X0NJqiobBzmxWDGpdgGRxI,1313900
5
5
  pywebexec/static/css/style.css,sha256=iLX6k1hoWLinZWyqtbH50U-0hND2M-5_Zr1U1UC_gos,5578
6
6
  pywebexec/static/css/xterm.css,sha256=gy8_LGA7Q61DUf8ElwFQzHqHMBQnbbEmpgZcbdgeSHI,5383
@@ -20,9 +20,9 @@ pywebexec/static/js/xterm/xterm-addon-fit.js,sha256=Pprm9pZe4SadVXS5Bc8b9VnC9Ex4
20
20
  pywebexec/static/js/xterm/xterm.js,sha256=Bzka76jZwEhVt_LlS0e0qMw7ryGa1p5qfxFyeohphBo,283371
21
21
  pywebexec/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  pywebexec/templates/index.html,sha256=DYtT555wSNhnFtzzHhPMWJireynCJNnAuTytpoORQeE,2321
23
- pywebexec-1.3.5.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
24
- pywebexec-1.3.5.dist-info/METADATA,sha256=rNB2fBP4AMqwoDaR9tE2yq3EDr1mKs6zW6neFJ87aRM,7397
25
- pywebexec-1.3.5.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
26
- pywebexec-1.3.5.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
27
- pywebexec-1.3.5.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
28
- pywebexec-1.3.5.dist-info/RECORD,,
23
+ pywebexec-1.3.6.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
24
+ pywebexec-1.3.6.dist-info/METADATA,sha256=vuIpsD_OxyKGVzMWDZO0HEAt0oPOtKt_0em-nvHc__s,7397
25
+ pywebexec-1.3.6.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
26
+ pywebexec-1.3.6.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
27
+ pywebexec-1.3.6.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
28
+ pywebexec-1.3.6.dist-info/RECORD,,