On Fri, 30 Aug 2019 10:10:32 +0100 David Woodhouse <dw...@infradead.org
> wrote:
> On Fri, 2019-08-30 at 07:29 +0000, Matthias Klose wrote:
> > Package: src:openconnect
> > Version: 8.02-1
> > Severity: normal
> > Tags: sid bullseye
> > User: debian-pyt...@lists.debian.org

> > Usertags: py2removal
> > 
> > Python2 becomes end-of-live upstream, and Debian aims to remove
> > Python2 from the distribution, as discussed in
> > https://lists.debian.org/debian-python/2019/07/msg00080.html

> > 
> > Your package either build-depends, depends on Python2, or uses
Python2
> > in the autopkg tests.  Please stop using Python2, and fix this
issue
> > by one of the following actions.
> 
> The OpenConnect 8.03 release converted the documentation processing
to
> use Python 3, which means that Python2 is no longer required to
build.
> I recommend updating. I will be making an 8.05 release in the next
week
> or so.
> 
> The helper script for the Juniper Host Checker system is still Python
> 2; any assistance with converting that would be most welcome. For the
> Fedora build we just removed that script from the binary package to
> eliminate the last Python 2 dependency (which is only runtime
anyway).

Do you have access to a Juniper connection to test it? The 2to3
automated conversion seems pretty simple and straightforward, and it
loads so the syntax should be correct, but I can't really test it in a
meaningful way:

--- a/trojans/tncc-wrapper.py
+++ b/trojans/tncc-wrapper.py
@@ -18,19 +18,19 @@
 
 import subprocess
 import mechanize
-import cookielib
+import http.cookiejar
 import getpass
 import sys
 import os
 import zipfile
-import urllib
+import urllib.request, urllib.parse, urllib.error
 import socket
 import ssl
 import errno
 import argparse
 import atexit
 import signal
-import ConfigParser
+import configparser
 import time
 import binascii
 import hmac
@@ -39,7 +39,7 @@ import hashlib
 def mkdir_p(path):
     try:
         os.mkdir(path)
-    except OSError, exc:
+    except OSError as exc:
         if exc.errno == errno.EEXIST and os.path.isdir(path):
             pass
         else:
@@ -64,9 +64,9 @@ class Tncc:
             if zipfile.ZipFile(self.tncc_jar, 'r').testzip() is not None:
                 raise Exception()
         except:
-            print 'Downloading tncc.jar...'
+            print('Downloading tncc.jar...')
             mkdir_p(os.path.expanduser('~/.juniper_networks'))
-            urllib.urlretrieve('https://' + self.vpn_host
+            urllib.request.urlretrieve('https://' + self.vpn_host
                                + '/dana-cached/hc/tncc.jar', self.tncc_jar)
 
         with zipfile.ZipFile(self.tncc_jar, 'r') as jar:

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to