From d082d8ac0f3c291a2eb2ad83dbd988f3af2648e0 Mon Sep 17 00:00:00 2001
From: Camila Moura <camilapaleo@gmail.com>
Date: Wed, 27 Feb 2019 14:40:40 +0100
Subject: [PATCH] Fixes the Python 3 dependencies and iterator

A. Fixes depedencies of Python 3:

Following the documentation about Python 3 requirements.
It was needed to change in the file ./requirements.txt
replacing "python-openid" with "python3-openid".

B. Fixing Python 3 compatibility in the migration script:

In order to fix the migration script to run on Python 3
I changed the line #24 on ./migrate/launchpad/reader.py,
changing the iterator.

Also, I added  in the file "./requirements.txt" a comment
to use the library "launchpadlib" in order to run
the migrate script.

Change-Id: Iedcd283ade1ea62fdc5777dfe7b1ae5916db3480
---
 requirements.txt                       | 3 ++-
 storyboard/migrate/launchpad/reader.py | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/requirements.txt b/requirements.txt
index 8ccf4eec..cddc49b0 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -11,7 +11,7 @@ pecan>=0.4.5
 oslo.db>=4.27.0  # Apache-2.0
 oslo.log>=1.0.0
 pika>=0.9.14
-python-openid
+python3-openid
 PyYAML>=3.1.0
 requests>=1.1
 six>=1.7.0
@@ -28,3 +28,4 @@ apscheduler>=3.0.1,<3.1.0
 python_dateutil>=2.4.0
 oslo.concurrency>=3.8.0         # Apache-2.0
 oslo.i18n>=2.1.0  # Apache-2.0
+#launchpadlib         # Only for migration
\ No newline at end of file
diff --git a/storyboard/migrate/launchpad/reader.py b/storyboard/migrate/launchpad/reader.py
index 249c8a40..4a75983c 100644
--- a/storyboard/migrate/launchpad/reader.py
+++ b/storyboard/migrate/launchpad/reader.py
@@ -39,4 +39,4 @@ class LaunchpadReader(object):
         return self.next()
 
     def next(self):
-        return self.task_iterator.next()
+        return next(self.task_iterator)