| |
@@ -1,4 +1,4 @@
|
| |
- #!/usr/bin/env python
|
| |
+ #!/usr/bin/env python3
|
| |
""" Populate the pagure db with some dev data. """
|
| |
import sys
|
| |
|
| |
@@ -40,7 +40,7 @@
|
| |
print('WARNING: Deleting all data from ', pagure.APP.config['DB_URL'])
|
| |
# Dangerous: this will wipe the data from the table but keep the schema
|
| |
print('')
|
| |
- response = raw_input('Do you want to continue yes or no? ')
|
| |
+ response = input('Do you want to continue yes or no? ')
|
| |
if 'yes'.startswith(response.lower()):
|
| |
for tbl in reversed(metadata.sorted_tables):
|
| |
if tbl.fullname != 'acls':
|
| |
@@ -447,22 +447,22 @@
|
| |
session = pagure.SESSION
|
| |
invalid_option = ['pingou', 'bar@pingou.com', 'foo', 'foo@bar.com']
|
| |
print("")
|
| |
- user_name = raw_input(
|
| |
+ user_name = input(
|
| |
"Enter your username so we can add you into the test data: ")
|
| |
while user_name in invalid_option:
|
| |
print("Reserved names: " + str(invalid_option))
|
| |
- user_name = raw_input(
|
| |
+ user_name = input(
|
| |
"Enter your username so we can add you into the test data: ")
|
| |
|
| |
if not user_name.replace(" ", ""):
|
| |
user_name = 'pythagoras'
|
| |
|
| |
print("")
|
| |
- user_email = raw_input("Enter your user email: ")
|
| |
+ user_email = input("Enter your user email: ")
|
| |
|
| |
while user_email in invalid_option:
|
| |
print("Reserved names: " + str(invalid_option))
|
| |
- user_email = raw_input("Enter your user email: ")
|
| |
+ user_email = input("Enter your user email: ")
|
| |
|
| |
if not user_email.replace(" ", ""):
|
| |
user_email = 'pythagoras@math.com'
|
| |
a few things i had to change in the setup scripts that were incompatible with a python v3-only system
'raw_input' was renamed to 'input' in python 3
from https://docs.python.org/3/whatsnew/3.0.html
PEP 3111: raw_input() was renamed to input(). That is, the new input() function reads a line from sys.stdin and returns it with the trailing newline stripped. It raises EOFError if the input is terminated prematurely. To get the old behavior of input(), use eval(input()).