summaryrefslogtreecommitdiff
path: root/source/xap/blueman/0002-NetConf-Treat-UnicodeDecodeError-as-if-there-was-no-.patch
blob: 17820a106c605d7641b8762a1621433571626eff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 2b4c3aecff94c1093de41285bba34b40bc69ddaf Mon Sep 17 00:00:00 2001
From: Sander Sweers <infirit@gmail.com>
Date: Mon, 2 May 2016 14:49:13 +0200
Subject: [PATCH 2/2] NetConf: Treat UnicodeDecodeError as if there was no file

This is unfortunate but most people will not even notice we created a new
state file.
---
 blueman/main/NetConf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blueman/main/NetConf.py b/blueman/main/NetConf.py
index d62dc14..4d7efd8 100644
--- a/blueman/main/NetConf.py
+++ b/blueman/main/NetConf.py
@@ -222,7 +222,7 @@ class NetConf(object):
             NetConf.default_inst = obj
             f.close()
             return obj
-        except IOError:
+        except (IOError, UnicodeDecodeError):
             n = cls()
             try:
                 n.store()
-- 
2.8.3