Bug fixes and packaging fixes, bumped to 0.1.0-2
authorEd Page <eopage@byu.net>
Fri, 25 Dec 2009 17:55:41 +0000 (11:55 -0600)
committerEd Page <eopage@byu.net>
Fri, 25 Dec 2009 17:55:41 +0000 (11:55 -0600)
src/constants.py
src/theonering.py
src/util/misc.py
support/builddeb.py

index 6af34f7..fdfb5c3 100644 (file)
@@ -3,9 +3,10 @@ import os
 __pretty_app_name__ = "Telepathy-TheOneRing"
 __app_name__ = "telepathy-theonering"
 __version__ = "0.1.0"
-__build__ = 1
+__build__ = 2
 __app_magic__ = 0xdeadbeef
 _data_path_ = os.path.join(os.path.expanduser("~"), ".telepathy-theonering")
 _user_settings_ = "%s/settings.ini" % _data_path_
+_user_logpath_ = "%s/theonering.log" % _data_path_
 _telepathy_protocol_name_ = "sip"
 _telepathy_implementation_name_ = "theonering"
index 58b00fe..7952ab0 100755 (executable)
@@ -91,11 +91,16 @@ def main(logToFile):
        if logToFile:
                logging.basicConfig(
                        level=logging.DEBUG,
+                       filename=constants._user_logpath_,
                        format='(%(asctime)s) %(levelname)s:%(name)s:%(message)s',
                        datefmt='%H:%M:%S',
                )
        else:
-               logging.basicConfig(level=logging.DEBUG, filename=constants._user_logpath_)
+               logging.basicConfig(
+                       level=logging.DEBUG,
+                       format='(%(asctime)s) %(levelname)s:%(name)s:%(message)s',
+                       datefmt='%H:%M:%S',
+               )
        logging.info("telepathy-theonering %s-%s" % (constants.__version__, constants.__build__))
        logging.info("OS: %s" % (os.uname()[0], ))
        logging.info("Kernel: %s (%s) for %s" % os.uname()[2:])
index 85c6ca0..8210a66 100644 (file)
@@ -230,6 +230,7 @@ def deprecated_api(func):
        def newFunc(*args, **kwargs):
                warnings.warn("Call to deprecated function %s." % func.__name__, category=DeprecationWarning)
                return func(*args, **kwargs)
+
        _append_docstring(newFunc, "\n@deprecated")
        return newFunc
 
@@ -410,6 +411,22 @@ def ExpHandler(handler = print_handler, *exceptions):
        return wrapper
 
 
+def into_debugger(func):
+       """
+       >>> validate_decorator(into_debugger)
+       """
+
+       @functools.wraps(func)
+       def newFunc(*args, **kwargs):
+               try:
+                       return func(*args, **kwargs)
+               except:
+                       import pdb
+                       pdb.post_mortem()
+
+       return newFunc
+
+
 class bindclass(object):
        """
        >>> validate_decorator(bindclass)
index 57a88a5..4f385a0 100755 (executable)
@@ -38,7 +38,7 @@ __changelog__ = """
 __postinstall__ = """#!/bin/sh -e
 
 gtk-update-icon-cache -f /usr/share/icons/hicolor
-rm -f ~/.telepathy-theonering/telepathy-theonering.log
+rm -f ~/.telepathy-theonering/theonering.log
 """
 
 def find_files(path):
@@ -77,10 +77,10 @@ def build_package(distribution):
        p.mail = __email__
        p.license = "lgpl"
        p.depends = ", ".join([
-               "python (>= 2.5)",
-               "python-dbus",
-               "python-gobject",
-               "python-telepathy",
+               "python (>= 2.5) | python2.5",
+               "python-dbus | python2.5-dbus",
+               "python-gobject | python2.5-gobject",
+               "python-telepathy | python2.5-telepathy",
        ])
        p.section = {
                "debian": "comm",