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

Bug#888657: ladish: should this package be removed?



Even though it is an old program, Ladish is still functional. On 22
April 2020, the developer added a patch for Python 3 compatibility.
Integrating it in this package could eliminate dependencies on Python 2.

I use ladish on a daily basis as it is a dependency of Claudia, a JACK
studio management application.

https://git.nedk.org/lad/ladish.git/commit/?id=c76a72c6e420f3070f4efac31bd840c1953b5641


From c76a72c6e420f3070f4efac31bd840c1953b5641 Mon Sep 17 00:00:00 2001
From: Nedko Arnaudov <nedko@nedk.org>
Date: Wed, 22 Apr 2020 19:55:14 +0300
Subject: ladish_control: py3 compatibility

---
 ladish_control | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/ladish_control b/ladish_control
index 4303f70b..9ff36839 100755
--- a/ladish_control
+++ b/ladish_control
@@ -145,7 +145,7 @@ def dump_graph(obj):
     patchbay_iface = dbus.Interface(obj, patchbay_interface_name)
     graph = patchbay_iface.GetGraph(0)
     for client in graph[1]:
-        print '"%s"' % client[1]
+        print('"%s"' % client[1])
         for port in client[2]:
             port_flags = port[2]
             if (port_flags & 1) != 0:
@@ -163,17 +163,17 @@ def dump_graph(obj):
             else:
                 port_type = "unknown"
 
-            print '  "%s" [%s %s]' % (port[1], port_flags, port_type)
+            print('  "%s" [%s %s]' % (port[1], port_flags, port_type))
     print
     if len(graph[2]):
         if len(graph[2]) == 1:
-            print "1 connection:"
+            print("1 connection:")
         else:
-            print "%u connections:" % len(graph[2])
+            print("%u connections:" % len(graph[2]))
         for connection in graph[2]:
-            print '"%s":"%s" -> "%s":"%s"' % (connection[1], connection[3], connection[5], connection[7])
+            print('"%s":"%s" -> "%s":"%s"' % (connection[1], connection[3], connection[5], connection[7]))
     else:
-        print "0 connections."
+        print("0 connections.")
 
 def main():
     if len(sys.argv) == 1:
@@ -522,7 +522,7 @@ def main():
                     patchbay_iface.DisconnectPortsByName(c1, p1, c2, p2)
                 else:
                     print("Unknown command '%s'" % arg)
-        except dbus.DBusException, e:
+        except (dbus.DBusException, e):
             print("DBus exception: %s" % str(e))
 
 if __name__ == '__main__':
-- 
cgit v1.2.1

Attachment: pEpkey.asc
Description: application/pgp-keys


Reply to: