Blame 87b9ec3914b720966436a069563c25a5a844f556.patch

a8603b6
From 87b9ec3914b720966436a069563c25a5a844f556 Mon Sep 17 00:00:00 2001
a8603b6
From: James Ross <itzexor@gmail.com>
a8603b6
Date: Wed, 16 Oct 2019 14:46:30 -0700
a8603b6
Subject: [PATCH] obex: check for None when setting shared path
a8603b6
a8603b6
g_get_user_special_dir() can return NULL/None but os.path.exists()
a8603b6
doesn't accept NoneType so we have to check for it, or catch the
a8603b6
exception.
a8603b6
---
a8603b6
 usr/lib/blueberry/blueberry-obex-agent.py | 2 +-
a8603b6
 1 file changed, 1 insertion(+), 1 deletion(-)
a8603b6
a8603b6
diff --git a/usr/lib/blueberry/blueberry-obex-agent.py b/usr/lib/blueberry/blueberry-obex-agent.py
a8603b6
index 50381a0..370bd59 100755
a8603b6
--- a/usr/lib/blueberry/blueberry-obex-agent.py
a8603b6
+++ b/usr/lib/blueberry/blueberry-obex-agent.py
a8603b6
@@ -32,7 +32,7 @@
a8603b6
 BOLD = lambda x: "\033[1m" + x + "\033[0m"
a8603b6
 
a8603b6
 SHARED_PATH = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_DOWNLOAD)
a8603b6
-if not os.path.exists(SHARED_PATH):
a8603b6
+if SHARED_PATH is None or not os.path.exists(SHARED_PATH):
a8603b6
     SHARED_PATH = os.path.expanduser("~")
a8603b6
 
a8603b6
 # i18n