🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #87451

Re: PyClean installation

#87451
From: Julien ÉLIE
Date: Sat, 28 May 2016 16:20
52 lines
2602 bytes
Hi Steve,

PyClean has been working perfectly for a few months, so that's pretty 
good news.


> Next I installed Python2.4 and tried to test against it.  There are a
> number of libraries that didn't exist back then

Also, datetime.strptime was added in Python 2.5; only time.strptime 
exists in Python 2.4.
Strange that none of us remarked it when we tested that at the beginning 
of the year.  I bet we did not totally restart INN.  I only noticed that 
yesterday when updating INN.

Here is a patch that fixes the issue:


--- pyclean.py	2016-05-28 16:40:26.000000000 +0200
+++ ../../bin/filter/filter_innd.py	2016-05-28 16:37:56.000000000 +0200
@@ -10,6 +10,7 @@
  import logging.handlers
  import shelve
  import sys
+import time
  import datetime
  import ConfigParser

@@ -38,7 +38,8 @@

  def dateobj(datestr):
      """Take a string formated date (yyyymmdd) and return a datetime 
object."""
-    return datetime.datetime.strptime(datestr, '%Y%m%d')
+    return datetime.datetime(*(time.strptime(datestr, '%Y%m%d')[0:6]))
+    #return datetime.datetime.strptime(datestr, '%Y%m%d')


  def nowstamp():



Have a nice day,

-- 
Julien ÉLIE

« – Ce n'était pas ma question.
   – C'était p'têt pas vot'question, oui, mais c'est ma
     réponse ! » (Georges Marchais répondant à Alain Duhamel)

Technical Details
Message-ID: <nicggb$hq4$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
References: <n4km8u$1ra$1@news.trigofacile.com> <slrnn95jel.lfk.steve@fleegle.mixmin.net>

Show Full Headers
Complete Article Headers
Message-ID: <nicggb$hq4$1@news.trigofacile.com>
Subject: Re: PyClean installation
Date: Sat, 28 May 2016 18:20:27 +0200
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <n4km8u$1ra$1@news.trigofacile.com> <slrnn95jel.lfk.steve@fleegle.mixmin.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 28 May 2016 16:20:27 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="2a01cb0801180400440b671f2cb3abf2.ipv6.abo.wanadoo.fr:2a01:cb08:118:400:440b:671f:2cb3:abf2";
 logging-data="18244"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0)
 Gecko/20100101 Thunderbird/45.1.0
In-Reply-To: <slrnn95jel.lfk.steve@fleegle.mixmin.net>
X-Received-Body-CRC: 1431685426
X-Received-Bytes: 2568