[Top][All Lists]

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

Re: [Jailkit-dev] Jailkit-2.20 patch to support Python3

From: William Stearns
Subject: Re: [Jailkit-dev] Jailkit-2.20 patch to support Python3
Date: Mon, 3 Jun 2019 17:50:01 -0400

Good day, all,
    I did screw up on the except calls, sorry for that.  I've attached a new version that:
- replaces
except one_or_more_error_types, (errno, strerror):
except one_or_more_error_types as e:
errno, strerror = e.args

- Makes all prints as functions (and loads "from __future__ import print_function" for compatibility when running under python2)
- Uses the appropriate values for octal 755 in python 2 and 3
- Loads the configparser library as ConfigParser under python 2 and configparser under python 3.
    I've tried to make these the simplest and clearest replacements so the diff is easy to check.  Please let me know if you find any issues with it.
    - Bill

On Fri, May 31, 2019 at 5:32 PM William Stearns <address@hidden> wrote:
Good day, all,
     I've made the minimal changes needed to run jailkit 2.20 on Python3 - patch is attached.  I've tried to structure this in a form that will continue to work on python2 as well.
    I'd appreciate it if someone could review the "except .... :" lines.  I've connected all of the errors into a single list, like:

-                       except OSError, (errno,strerror):

+                       except (OSError, errno, strerror):

    but am not sure this matches the original intent.
    Many thanks for your work on jailkit.  Cheers,
    - Bill

Attachment: jailkit-2.20-python3-compatibility.201906032134.patch
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]