| |
@@ -40,19 +40,19 @@
|
| |
current_rev = context.get_current_revision()
|
| |
|
| |
if current_rev:
|
| |
- print "Database already initialized and at rev %s - not re-initializing" % current_rev
|
| |
+ print("Database already initialized and at rev %s - not re-initializing" % current_rev)
|
| |
else:
|
| |
- print "Initializing Database"
|
| |
+ print("Initializing Database")
|
| |
db.drop_all()
|
| |
db.create_all()
|
| |
|
| |
- print "Initializing alembic version"
|
| |
+ print("Initializing alembic version")
|
| |
|
| |
al_command.stamp(alembic_cfg, "head")
|
| |
|
| |
|
| |
def upgrade_db():
|
| |
- print "Upgrading Database to Latest Revision"
|
| |
+ print("Upgrading Database to Latest Revision")
|
| |
alembic_cfg = get_alembic_config()
|
| |
al_command.upgrade(alembic_cfg, "head")
|
| |
|
| |
@@ -60,9 +60,9 @@
|
| |
def add_release(number):
|
| |
existing_release = Release.query.filter_by(number=number).count()
|
| |
if existing_release > 0:
|
| |
- print "Release %s already exists, not adding" % number
|
| |
+ print("Release %s already exists, not adding" % number)
|
| |
else:
|
| |
- print "Adding release %s" % number
|
| |
+ print("Adding release %s" % number)
|
| |
release_num = int(number)
|
| |
new_release = Release(release_num)
|
| |
db.session.add(new_release)
|
| |
@@ -76,9 +76,9 @@
|
| |
|
| |
current_milestones = Milestone.query.filter_by(active=True).count()
|
| |
if existing_milestone > 0:
|
| |
- print "Milestone already exists, not adding: %s-%s (%s, %s)" % (number, version, blocker, fe)
|
| |
+ print("Milestone already exists, not adding: %s-%s (%s, %s)" % (number, version, blocker, fe))
|
| |
else:
|
| |
- print "Adding milestone: %s-%s (%s, %s)" % (number, version, blocker, fe)
|
| |
+ print("Adding milestone: %s-%s (%s, %s)" % (number, version, blocker, fe))
|
| |
release_num = int(number)
|
| |
release = Release.query.filter_by(number=release_num).first()
|
| |
if not release:
|
| |
@@ -103,7 +103,7 @@
|
| |
def generate_config(dburi=None):
|
| |
config_filename = os.path.abspath('conf/settings.py')
|
| |
if os.path.exists(config_filename):
|
| |
- print "configuration file %s already exists, exiting" % config_filename
|
| |
+ print("configuration file %s already exists, exiting" % config_filename)
|
| |
sys.exit(0)
|
| |
|
| |
secret_key = os.urandom(24).encode('string_escape')
|
| |
@@ -134,14 +134,14 @@
|
| |
if not new_bug:
|
| |
missing_bugs.append(bugid)
|
| |
|
| |
- print "========================================"
|
| |
- print "Fedora %d %s Missing Blocker Bugs" % (milestone.release.number, milestone.version)
|
| |
- print "========================================"
|
| |
+ print("========================================")
|
| |
+ print("Fedora %d %s Missing Blocker Bugs" % (milestone.release.number, milestone.version))
|
| |
+ print("========================================")
|
| |
if len(missing_bugs) > 0:
|
| |
for bug in missing_bugs:
|
| |
- print " * %d" % bug
|
| |
+ print(" * %d" % bug)
|
| |
else:
|
| |
- print " No missing bugs found"
|
| |
+ print(" No missing bugs found")
|
| |
|
| |
|
| |
def sync_bugs(fullsync=False, docheck=False):
|
| |
@@ -158,7 +158,7 @@
|
| |
sync.update_active(full_sync=fullsync)
|
| |
|
| |
if docheck:
|
| |
- print "Checking bug sync status"
|
| |
+ print("Checking bug sync status")
|
| |
check_blockers(bzurl)
|
| |
|
| |
|
| |
@@ -196,13 +196,13 @@
|
| |
(options, args) = parser.parse_args()
|
| |
|
| |
if len(args) < 1:
|
| |
- print "need to have at least 1 command"
|
| |
+ print("need to have at least 1 command")
|
| |
sys.exit(1)
|
| |
|
| |
command = args[0]
|
| |
if not command in possible_commands:
|
| |
- print 'Invalid command: %s' % command
|
| |
- print 'Please use one of the following commands: %s' % str(possible_commands)
|
| |
+ print("Invalid command: %s" % command)
|
| |
+ print("Please use one of the following commands: %s" % str(possible_commands))
|
| |
sys.exit(1)
|
| |
|
| |
if command == 'sync':
|
| |
Use print("") instead of print ""
This is compatible with both Python 2 and Python 3, no need to use the old syntax.