Skip to content

Commit

Permalink
ping
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFern2 committed Mar 1, 2021
1 parent 5c228f8 commit be86672
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions data_preserve.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"""

from pylogix import PLC
# from ping3 import ping
from ping3 import ping
import configparser, argparse
import sys
from pathlib import Path
Expand All @@ -27,6 +27,8 @@
import re
import shutil
import os
import logging
from logging.handlers import RotatingFileHandler

# variables are read from Settings.ini
main_controller_ip = ''
Expand Down Expand Up @@ -297,9 +299,9 @@ def print_header():
args = parser.parse_args()

# ping controller
# if ping(main_controller_ip) is None:
# print("Check Settings.ini or ethernet connection!")
# sys.exit()
if ping(main_controller_ip) is None:
print("Check Settings.ini or ethernet connection!")
sys.exit()

# if local path is empty use root dir
if dp_save_local_path == "":
Expand Down

0 comments on commit be86672

Please sign in to comment.