7835:0835ed67714b | 7836:2f0d208b8137 |
---|---|
78 except OSError: | 78 except OSError: |
79 pass | 79 pass |
80 try: | 80 try: |
81 with open(config, "w") as f: | 81 with open(config, "w") as f: |
82 f.write(DefaultConfig) | 82 f.write(DefaultConfig) |
83 except IOError: | 83 except OSError: |
84 pass | 84 pass |
85 | 85 |
86 | 86 |
87 def amendConfig(): | 87 def amendConfig(): |
88 """ | 88 """ |
90 """ | 90 """ |
91 config = getConfigPath() | 91 config = getConfigPath() |
92 try: | 92 try: |
93 with open(config, "r") as f: | 93 with open(config, "r") as f: |
94 configList = f.read().splitlines() | 94 configList = f.read().splitlines() |
95 except IOError: | 95 except OSError: |
96 return | 96 return |
97 | 97 |
98 newConfig = [] | 98 newConfig = [] |
99 ignoresFound = False | 99 ignoresFound = False |
100 amendList = [] | 100 amendList = [] |
127 | 127 |
128 if newConfig != configList: | 128 if newConfig != configList: |
129 try: | 129 try: |
130 with open(config, "w") as f: | 130 with open(config, "w") as f: |
131 f.write("\n".join(newConfig)) | 131 f.write("\n".join(newConfig)) |
132 except IOError: | 132 except OSError: |
133 pass | 133 pass |