diff scripts/imapServer.py @ 5401:4cf48ff01e04

Python 3 preparation: replace raw_input uses. The existing my_input in roundup/admin.py is moved to a new roundup/anypy/my_input.py, which is then used in more places. Manual patch.
author Joseph Myers <jsm@polyomino.org.uk>
date Tue, 24 Jul 2018 23:47:10 +0000
parents 0942fe89e82e
children b5fffd2a64af
line wrap: on
line diff
--- a/scripts/imapServer.py	Tue Jul 24 23:16:09 2018 +0000
+++ b/scripts/imapServer.py	Tue Jul 24 23:47:10 2018 +0000
@@ -39,6 +39,8 @@
 import re
 import time
 
+from roundup.anypy.my_input import my_input
+
 logging.basicConfig()
 log = logging.getLogger('roundup.IMAPServer')
 
@@ -59,20 +61,20 @@
 
         try:
             if not self.dbhome:
-                self.dbhome = raw_input('Tracker home: ')
+                self.dbhome = my_input('Tracker home: ')
                 if not os.path.exists(self.dbhome):
                     raise ValueError('Invalid home address: ' \
                         'directory "%s" does not exist.' % self.dbhome)
 
             if not self.server:
-                self.server = raw_input('Server: ')
+                self.server = my_input('Server: ')
                 if not self.server:
                     raise ValueError('No Servername supplied')
-                protocol = raw_input('protocol [imaps]? ')
+                protocol = my_input('protocol [imaps]? ')
                 self.protocol = protocol
 
             if not self.username:
-                self.username = raw_input('Username: ')
+                self.username = my_input('Username: ')
                 if not self.username:
                     raise ValueError('Invalid Username')
 
@@ -83,7 +85,7 @@
                 # by a later entry
 
             #if self.mailbox is None:
-            #   self.mailbox = raw_input('Mailbox [INBOX]: ')
+            #   self.mailbox = my_input('Mailbox [INBOX]: ')
             #   # We allow an empty mailbox because that will
             #   # select the INBOX, whatever it is called
 

Roundup Issue Tracker: http://roundup-tracker.org/