[SCM] KDE Admin module packaging branch, master, updated. debian/4.6.5-2-9-g1d91596

José Manuel Santamaría Lema santa-guest at alioth.debian.org
Sat Nov 19 12:54:25 UTC 2011


The following commit has been merged in the master branch:
commit aedce55bc058c9eaffdb605d957d5b35bc533a54
Author: José Manuel Santamaría Lema <panfaust at gmail.com>
Date:   Sat Nov 19 13:52:40 2011 +0100

    Add debug.py convenience copy.
---
 debian/debug.py                          |   57 ++++++++++++++++++++++++++++++
 debian/system-config-printer-kde.install |    7 ++--
 2 files changed, 61 insertions(+), 3 deletions(-)

diff --git a/debian/debug.py b/debian/debug.py
new file mode 100644
index 0000000..2f1f515
--- /dev/null
+++ b/debian/debug.py
@@ -0,0 +1,57 @@
+#!/usr/bin/python
+
+## Copyright (C) 2008, 2010 Red Hat, Inc.
+## Authors:
+##  Tim Waugh <twaugh at redhat.com>
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+import sys
+import traceback
+
+_debug=False
+def debugprint (x):
+    if _debug:
+        try:
+            sys.stderr.write (x + "
")
+            sys.stderr.flush ()
+        except:
+            pass
+
+def get_debugging ():
+    return _debug
+
+def set_debugging (d):
+    global _debug
+    _debug = d
+
+def fatalException (exitcode=1):
+    nonfatalException (type="fatal", end="Exiting")
+    sys.exit (exitcode)
+
+def nonfatalException (type="non-fatal", end="Continuing anyway.."):
+    d = get_debugging ()
+    set_debugging (True)
+    debugprint ("Caught %s exception.  Traceback:" % type)
+    (type, value, tb) = sys.exc_info ()
+    tblast = traceback.extract_tb (tb, limit=None)
+    if len (tblast):
+        tblast = tblast[:len (tblast) - 1]
+    extxt = traceback.format_exception_only (type, value)
+    for line in traceback.format_tb(tb):
+        debugprint (line.strip ())
+    debugprint (extxt[0].strip ())
+    debugprint (end)
+    set_debugging (d)
diff --git a/debian/system-config-printer-kde.install b/debian/system-config-printer-kde.install
index 438f0e8..1c3480e 100644
--- a/debian/system-config-printer-kde.install
+++ b/debian/system-config-printer-kde.install
@@ -1,3 +1,7 @@
+debian/debug.py usr/share/kde4/apps/system-config-printer-kde/
+debian/ppdippstr.py usr/share/kde4/apps/system-config-printer-kde/
+debian/pysmb.py usr/share/kde4/apps/system-config-printer-kde/
+debian/smburi.py usr/share/kde4/apps/system-config-printer-kde/
 usr/share/kde4/apps/system-config-printer-kde/authconn.py
 usr/share/kde4/apps/system-config-printer-kde/ipp-browse-dialog.ui
 usr/share/kde4/apps/system-config-printer-kde/new-printer.ui
@@ -8,6 +12,3 @@ usr/share/kde4/apps/system-config-printer-kde/smb-browse-dialog.ui
 usr/share/kde4/apps/system-config-printer-kde/system-config-printer-kde.py
 usr/share/kde4/apps/system-config-printer-kde/system-config-printer.ui
 usr/share/kde4/services/system-config-printer-kde.desktop
-debian/ppdippstr.py usr/share/kde4/apps/system-config-printer-kde/
-debian/pysmb.py usr/share/kde4/apps/system-config-printer-kde/
-debian/smburi.py usr/share/kde4/apps/system-config-printer-kde/

-- 
KDE Admin module packaging



More information about the pkg-kde-commits mailing list