Don't fail when folder doesn't exist #2

Open
opened 2020-09-30 17:56:56 -07:00 by mike · 0 comments
Owner

Don't fail when a config file specifies a directory that doesn't exist; Just complain:

Traceback (most recent call last):
  File "/usr/local/bin/backup-rotator", line 258, in <module>
    main()
  File "/usr/local/bin/backup-rotator", line 254, in main
    rotator.run()
  File "/usr/local/bin/backup-rotator", line 45, in run
    self.do_rotate(config)
  File "/usr/local/bin/backup-rotator", line 128, in do_rotate
    self.rotate_paths(config)
  File "/usr/local/bin/backup-rotator", line 134, in rotate_paths
    self.rotate_path(config, path)
  File "/usr/local/bin/backup-rotator", line 145, in rotate_path
    raise Exception("Path should be a directory:" + str(path))
Exception: Path should be a directory:[redacted]
Don't fail when a config file specifies a directory that doesn't exist; Just complain: ``` Traceback (most recent call last): File "/usr/local/bin/backup-rotator", line 258, in <module> main() File "/usr/local/bin/backup-rotator", line 254, in main rotator.run() File "/usr/local/bin/backup-rotator", line 45, in run self.do_rotate(config) File "/usr/local/bin/backup-rotator", line 128, in do_rotate self.rotate_paths(config) File "/usr/local/bin/backup-rotator", line 134, in rotate_paths self.rotate_path(config, path) File "/usr/local/bin/backup-rotator", line 145, in rotate_path raise Exception("Path should be a directory:" + str(path)) Exception: Path should be a directory:[redacted] ```
mike added the
bug
label 2020-09-30 17:56:56 -07:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: misc-utilities/mikes-backup-rotator#2
No description provided.