[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] share/debian-edu-config/pam-nopwdchange.py: converted to python3 with python-modernize.

Holger Levsen gitlab at salsa.debian.org
Mon Oct 28 11:46:25 GMT 2019



Holger Levsen pushed to branch master at Debian Edu / debian-edu-config


Commits:
a5b94085 by Holger Levsen at 2019-10-28T11:46:06Z
share/debian-edu-config/pam-nopwdchange.py: converted to python3 with python-modernize.

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


2 changed files:

- debian/changelog
- share/debian-edu-config/pam-nopwdchange.py


Changes:

=====================================
debian/changelog
=====================================
@@ -9,6 +9,8 @@ debian-edu-config (2.11.7) UNRELEASED; urgency=medium
 
   [ Holger Levsen ]
   * debian/control: Drop Depends on python.
+  * share/debian-edu-config/pam-nopwdchange.py: converted to python3 with
+    python-modernize.
 
  -- Wolfgang Schweer <wschweer at arcor.de>  Sun, 27 Oct 2019 14:27:59 +0100
 


=====================================
share/debian-edu-config/pam-nopwdchange.py
=====================================
@@ -1,8 +1,10 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 #
 # Reject password change, ask people to use the Gosa web interface
 # instead.
 
+from __future__ import absolute_import
+from __future__ import print_function
 import sys
 import syslog
 import pwd
@@ -51,10 +53,10 @@ if __name__ == '__main__':
     def Message(self, tag, str):
       return str
     def conversation(self, msg):
-      print "PAM conversation: " + msg
+      print("PAM conversation: " + msg)
       return
   pamh = pam_handler()
   if pamh.PAM_SUCCESS == pam_sm_chauthtok(pamh, None, None):
-    print "pam_sm_chauthtok returned PAM_SUCCESS"
+    print("pam_sm_chauthtok returned PAM_SUCCESS")
   else:
-    print "pam_sm_chauthtok returned PAM_SYSTEM_ERR"
+    print("pam_sm_chauthtok returned PAM_SYSTEM_ERR")



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/commit/a5b94085b9f7ea70fd8a48330e16674eacb5dea9

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/commit/a5b94085b9f7ea70fd8a48330e16674eacb5dea9
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20191028/4e14fb54/attachment-0001.html>


More information about the debian-edu-commits mailing list