Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d889230ed
|
||
|
|
48049f68b6
|
||
|
|
b3a31ada0b
|
+2
-3
@@ -375,8 +375,6 @@ def main():
|
|||||||
snapshots = zsnaplib.get_snapshots(local_zfs_cmd)
|
snapshots = zsnaplib.get_snapshots(local_zfs_cmd)
|
||||||
|
|
||||||
failed_send = send_snapshots(fslist, snapshots, config)
|
failed_send = send_snapshots(fslist, snapshots, config)
|
||||||
if failed_send:
|
|
||||||
ret = RET_CODES['ERROR']
|
|
||||||
failed_snapshots.update(failed_send)
|
failed_snapshots.update(failed_send)
|
||||||
for remote in remotes.keys():
|
for remote in remotes.keys():
|
||||||
failed_send = send_snapshots(
|
failed_send = send_snapshots(
|
||||||
@@ -397,6 +395,7 @@ def main():
|
|||||||
failed_snapshots)
|
failed_snapshots)
|
||||||
|
|
||||||
os.remove(lockfile)
|
os.remove(lockfile)
|
||||||
|
return ret
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
log = logging.getLogger(LOGGER)
|
log = logging.getLogger(LOGGER)
|
||||||
@@ -409,7 +408,7 @@ if __name__ == '__main__':
|
|||||||
for logsocket in ('/var/run/log', '/dev/log'):
|
for logsocket in ('/var/run/log', '/dev/log'):
|
||||||
try:
|
try:
|
||||||
mode = os.stat(logsocket).st_mode
|
mode = os.stat(logsocket).st_mode
|
||||||
except FileNotFoundError:
|
except (PermissionError, FileNotFoundError):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if stat.S_ISSOCK(mode):
|
if stat.S_ISSOCK(mode):
|
||||||
|
|||||||
Reference in New Issue
Block a user