2
2
import os
3
3
import sys
4
4
from util .channel_access import ChannelAccessUtils
5
- from util .ssh_access import runSSHCommand
5
+ from util .ssh_access import SSHAccessUtils
6
6
import requests
7
7
8
8
EPICS_DIR = "C:\\ Instrument\\ Apps\\ EPICS\\ "
@@ -64,7 +64,8 @@ def check_for_uncommitted_changes(hostname):
64
64
CHECK: The result of the check.
65
65
"""
66
66
command = f"cd { EPICS_DIR } && git status --porcelain"
67
- ssh_process = runSSHCommand (hostname , SSH_USERNAME , SSH_PASSWORD , command )
67
+ ssh_process = SSHAccessUtils .runSSHCommand (
68
+ hostname , SSH_USERNAME , SSH_PASSWORD , command )
68
69
69
70
if ssh_process ['success' ]:
70
71
if ssh_process ['output' ].strip () != "" :
@@ -86,7 +87,8 @@ def get_parent_branch(hostname):
86
87
str: The name of the parent branch.
87
88
"""
88
89
command = f"cd { EPICS_DIR } && git log"
89
- ssh_process = runSSHCommand (hostname , SSH_USERNAME , SSH_PASSWORD , command )
90
+ ssh_process = SSHAccessUtils .runSSHCommand (
91
+ hostname , SSH_USERNAME , SSH_PASSWORD , command )
90
92
if ssh_process ['success' ]:
91
93
if "galil-old" in ssh_process ['output' ]:
92
94
return "origin/galil-old"
@@ -117,14 +119,15 @@ def git_log_analyszer(hostname, changes_on=None, subtracted_against=None, prefix
117
119
118
120
# fetch latest changes from the remote
119
121
fetch_command = f"cd { EPICS_DIR } && git fetch origin"
120
- ssh_process_fetch = runSSHCommand (
122
+ ssh_process_fetch = SSHAccessUtils . runSSHCommand (
121
123
hostname , SSH_USERNAME , SSH_PASSWORD , fetch_command )
122
124
if not ssh_process_fetch ['success' ]:
123
125
return CHECK .UNDETERMINABLE , None
124
126
125
127
command = f"cd { EPICS_DIR } && git log --format=\" %h %s\" { branch_details } "
126
128
127
- ssh_process = runSSHCommand (hostname , SSH_USERNAME , SSH_PASSWORD , command )
129
+ ssh_process = SSHAccessUtils .runSSHCommand (
130
+ hostname , SSH_USERNAME , SSH_PASSWORD , command )
128
131
129
132
commit_dict = {}
130
133
0 commit comments