[gnome-clocks] Use the system pycanberra



commit 3bb5d7ca10dd441cec9f1b0a7f558c041962800c
Author: Mathieu Bridon <bochecha fedoraproject org>
Date:   Wed Feb 6 16:43:25 2013 +0800

    Use the system pycanberra
    
    As pycanberra has not yet been ported to Python 3, keep the fallback on
    the bundled version.

 gnomeclocks/utils.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gnomeclocks/utils.py b/gnomeclocks/utils.py
index 637983d..159fe67 100644
--- a/gnomeclocks/utils.py
+++ b/gnomeclocks/utils.py
@@ -20,7 +20,13 @@ import os
 import time
 import datetime
 from gi.repository import GObject, Gio, GnomeDesktop, Notify
-from . import pycanberra
+
+try:
+    import pycanberra
+except ImportError:
+    # Fallback on the bundled version
+    from . import pycanberra
+
 from gnomeclocks import GNOMECLOCKS_DATADIR
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]