Skip to content

Commit

Permalink
Bump dockerpy version to 6.0.1 and remove patches for Windows (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skazza94 committed Dec 15, 2022
1 parent a5cd00d commit 9adcb66
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 23 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
keywords=['NETWORK-EMULATION', 'CONTAINERS', 'NFV'],
install_requires=[
"binaryornot>=0.4.4",
"docker>=4.4.4",
"docker>=6.0.1",
"kubernetes>=23.3.0",
"requests>=2.22.0",
"coloredlogs>=10.0",
Expand Down
6 changes: 0 additions & 6 deletions src/Kathara/cli/command/ExecCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
from ...parser.netkit.LabParser import LabParser
from ...strings import strings, wiki_description

pywintypes = utils.import_pywintypes()


class ExecCommand(Command):
def __init__(self) -> None:
Expand Down Expand Up @@ -92,9 +90,5 @@ def run(self, current_path: str, argv: List[str]) -> None:
sys.stdout.write(stdout)
if stderr and not args['no_stderr']:
sys.stderr.write(stderr)
except pywintypes.error as e:
(code, reason, _) = e.args
if code == 109 and reason == 'ReadFile':
pass
except StopIteration:
pass
7 changes: 0 additions & 7 deletions src/Kathara/foundation/test/Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

from ...manager.Kathara import Kathara
from ...model.Lab import Lab
from ...utils import import_pywintypes

pywintypes = import_pywintypes()


class Test(ABC):
Expand Down Expand Up @@ -49,9 +46,5 @@ def _get_machine_command_output(lab_hash, machine_name, command):
result['stdout'] += stdout.decode('utf-8')
if stderr:
result['stderr'] += stderr.decode('utf-8')
except pywintypes.error as e:
(code, reason, _) = e.args
if code == 109 and reason == 'ReadFile':
pass
except StopIteration:
return result['stdout'], result['stderr']
6 changes: 0 additions & 6 deletions src/Kathara/manager/docker/DockerMachine.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
from ...model.Machine import Machine
from ...setting.Setting import Setting

pywintypes = utils.import_pywintypes()

RP_FILTER_NAMESPACE = "net.ipv4.conf.%s.rp_filter"

# Known commands that each container should execute
Expand Down Expand Up @@ -528,10 +526,6 @@ def connect(self, lab_hash: str, machine_name: str, user: str = None, shell: str
while True:
(stdout, _) = next(exec_output)
startup_output += stdout.decode('utf-8') if stdout else ""
except pywintypes.error as e:
(code, reason, _) = e.args
if code == 109 and reason == 'ReadFile':
pass
except StopIteration:
pass

Expand Down
4 changes: 2 additions & 2 deletions src/Kathara/manager/docker/DockerManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
from ...model.Link import Link
from ...model.Machine import Machine
from ...setting.Setting import Setting
from ...utils import pack_files_for_tar
from ...utils import pack_files_for_tar, import_pywintypes

pywintypes = utils.import_pywintypes()
pywintypes = import_pywintypes()


def check_docker_status(method):
Expand Down
2 changes: 1 addition & 1 deletion src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
binaryornot>=0.4.4;
docker>=4.4.4;
docker>=6.0.1;
kubernetes>=23.3.0;
requests>=2.22.0;
coloredlogs>=10.0;
Expand Down

0 comments on commit 9adcb66

Please sign in to comment.