Hi Petter, On Di 30 Okt 2012 20:14:58 CET Petter Reinholdtsen wrote:
With this in place, I get these errors, which seem to be due to old Python code: administrator:~# su - holger -c "PGPORT=5434 dak process-new"/usr/lib/python2.6/site-packages/daklib/utils.py:1146: DeprecationWarning: apt_pkg.newConfiguration() is deprecated. Use apt_pkg.Configuration() instead.Cnf = apt_pkg.newConfiguration()/usr/lib/python2.6/site-packages/examine_package.py:35: DeprecationWarning: the md5 module is deprecated; use hashlib insteadimport errno, os, pg, re, sys, md5/usr/lib/python2.6/site-packages/process_new.py:808: DeprecationWarning: Attribute 'SubTree' of the 'apt_pkg.Configuration' object is deprecated, use 'subtree' instead.Options = Cnf.SubTree("Process-New::Options") Traceback (most recent call last): File "/usr/bin/dak", line 186, in <module> main() File "/usr/bin/dak", line 181, in main module.main() File "/usr/lib/python2.6/site-packages/process_new.py", line 1000, in main changes_files = init() File "/usr/lib/python2.6/site-packages/process_new.py", line 816, in init Logger = Upload.Logger = daklib.logging.Logger(Cnf, "process-new")File "/usr/lib/python2.6/site-packages/daklib/logging.py", line 50, in __init__logfile = utils.open_file(logfilename, 'a')File "/usr/lib/python2.6/site-packages/daklib/utils.py", line 84, in open_fileraise cant_open_exc, filenameTypeError: exceptions must be old-style classes or derived from BaseException, not stradministrator:~# Anyone have any idea how to proceed from here? Fetch a newer version of dak, perhaps?
Yeah this feels like ancient Python code. Since Python 2.6 it is not possible to raise exceptions of type str anymore.
http://python-history.blogspot.dk/2009/03/how-exceptions-came-to-be-classes.html Mike -- DAS-NETZWERKTEAM mike gabriel, rothenstein 5, 24214 neudorf-bornstein fon: +49 (1520) 1976 148 GnuPG Key ID 0x25771B31 mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb
Attachment:
pgpEwG5RVQxhB.pgp
Description: Digitale PGP-Unterschrift