commit message from python script
This commit is contained in:
@@ -4,7 +4,7 @@ import os, time, subprocess
|
||||
|
||||
def check_ping(hostname = str):
|
||||
list_command = list(str('timeout 0.2 ping -c 1 ' + hostname).split())
|
||||
response = subprocess.run(list_command, stdout=subprocess.PIPE)
|
||||
response = subprocess.run(list_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
# and then check the response...
|
||||
if response.returncode == 0:
|
||||
return True
|
||||
@@ -16,7 +16,7 @@ def rclone_folders_copy(folder_to_sync=list, dest_folder = str):
|
||||
for sync_folder in folder_to_sync:
|
||||
print("Hole Datein", 'rclone:' + sync_folder, "...")
|
||||
list_command = list(str('rclone copy rclone:' + sync_folder + ' ' + dest_folder + os.sep + sync_folder + ' --update --create-empty-src-dirs').split())
|
||||
command = subprocess.run(list_command, stdout=subprocess.PIPE)
|
||||
command = subprocess.run(list_command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if command.returncode == 0:
|
||||
check_list.append(True)
|
||||
elif command > 0:
|
||||
@@ -25,7 +25,7 @@ def rclone_folders_copy(folder_to_sync=list, dest_folder = str):
|
||||
print("Kopiere Datein", dest_folder + os.sep + sync_folder, "..." )
|
||||
|
||||
list_command = list(str('rclone copy ' + dest_folder + os.sep + sync_folder + ' ' + "rclone:" + sync_folder + ' --update --create-empty-src-dirs').split())
|
||||
command = subprocess.run(list_command, stdout=subprocess.PIPE)
|
||||
command = subprocess.run(list_command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if command.returncode == 0:
|
||||
check_list.append(True)
|
||||
elif command.returncode > 0:
|
||||
|
||||
Reference in New Issue
Block a user