Skip to content

Commit

Permalink
Merge ec045f9 into b1177ce
Browse files Browse the repository at this point in the history
  • Loading branch information
Zepmanbc committed Jan 29, 2020
2 parents b1177ce + ec045f9 commit de4dcc4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions creopyson/connection.py
@@ -1,6 +1,7 @@
"""Connection module."""
import requests
import json
from pathlib import Path
from .exceptions import MissingKey, ErrorJsonDecode


Expand Down Expand Up @@ -159,8 +160,9 @@ def start_creo(self, path, retries=0):
None
"""
start_command = path.split('/')[-1]
start_dir = path.replace(start_command, '')[:-1]
path_obj = Path(path)
start_command = path_obj.name
start_dir = str(path_obj.parents[0])
data = {
"start_dir": start_dir,
"start_command": start_command,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_connection.py
Expand Up @@ -363,7 +363,7 @@ def test_connection_kill_creo_ok(mk_creoson_post_None):
def test_connection_start_creo_ok(mk_creoson_post_None):
"""Test no error returned from creoson."""
c = creopyson.Client()
result = c.start_creo("C:/folder/nitro_proe_remote.bat")
result = c.start_creo("C:/path/to/nitro_proe_remote.bat")
assert result is None


Expand Down

0 comments on commit de4dcc4

Please sign in to comment.