Browse Source

Remove dead code.

master
Dan Helfman 6 days ago
parent
commit
fb21d4e645
2 changed files with 0 additions and 27 deletions
  1. 0
    18
      borgmatic/config/convert.py
  2. 0
    9
      tests/unit/config/test_convert.py

+ 0
- 18
borgmatic/config/convert.py View File

@@ -93,21 +93,3 @@ def guard_configuration_upgraded(source_config_filename, destination_config_file
93 93
 
94 94
     if os.path.exists(source_config_filename) and not destination_config_exists:
95 95
         raise LegacyConfigurationNotUpgraded()
96
-
97
-
98
-class LegacyExcludesFilenamePresent(FileNotFoundError):
99
-    def __init__(self):
100
-        super(LegacyExcludesFilenamePresent, self).__init__(
101
-            '''borgmatic changed its configuration file format in version 1.1.0 from INI-style
102
-to YAML. This better supports validation, and has a more natural way to express
103
-lists of values. The new configuration file incorporates excludes, so you no
104
-longer need to provide an excludes filename on the command-line with an
105
-"--excludes" argument.
106
-
107
-Please remove the "--excludes" argument and run borgmatic again.'''
108
-        )
109
-
110
-
111
-def guard_excludes_filename_omitted(excludes_filename):
112
-    if excludes_filename is not None:
113
-        raise LegacyExcludesFilenamePresent()

+ 0
- 9
tests/unit/config/test_convert.py View File

@@ -117,12 +117,3 @@ def test_guard_configuration_upgraded_does_not_raise_when_neither_config_present
117 117
     flexmock(os.path).should_receive('exists').with_args('other.yaml').and_return(False)
118 118
 
119 119
     module.guard_configuration_upgraded('config', ('config.yaml', 'other.yaml'))
120
-
121
-
122
-def test_guard_excludes_filename_omitted_raises_when_filename_provided():
123
-    with pytest.raises(module.LegacyExcludesFilenamePresent):
124
-        module.guard_excludes_filename_omitted(excludes_filename='/etc/borgmatic/excludes')
125
-
126
-
127
-def test_guard_excludes_filename_omitted_does_not_raise_when_filename_not_provided():
128
-    module.guard_excludes_filename_omitted(excludes_filename=None)

Loading…
Cancel
Save