You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/12/16 18:10:11 UTC

[32/36] git commit: [#6922] ticket:501 Fix a couple of AttributeErrors on None

[#6922] ticket:501 Fix a couple of AttributeErrors on None


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/989c0536
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/989c0536
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/989c0536

Branch: refs/heads/cj/6821
Commit: 989c053668e37b643d431b9e3fe9a35c3fdc3715
Parents: 42e29a3
Author: Igor Bondarenko <je...@gmail.com>
Authored: Thu Dec 12 11:54:26 2013 +0000
Committer: Cory Johns <ad...@users.sf.net>
Committed: Thu Dec 12 20:48:09 2013 +0000

----------------------------------------------------------------------
 ForgeImporters/forgeimporters/github/tracker.py | 2 +-
 ForgeImporters/forgeimporters/github/utils.py   | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/989c0536/ForgeImporters/forgeimporters/github/tracker.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/tracker.py b/ForgeImporters/forgeimporters/github/tracker.py
index 97ea16b..d63becf 100644
--- a/ForgeImporters/forgeimporters/github/tracker.py
+++ b/ForgeImporters/forgeimporters/github/tracker.py
@@ -235,7 +235,7 @@ class GitHubTrackerImporter(ToolImporter):
         for milestone in self.open_milestones:
             global_milestones['milestones'].append({
                 'name': milestone[0],
-                'due_date': unicode(milestone[1].date()),
+                'due_date': unicode(milestone[1].date()) if milestone[1] else None,
                 'complete': False,
             })
         return [global_milestones]

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/989c0536/ForgeImporters/forgeimporters/github/utils.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/utils.py b/ForgeImporters/forgeimporters/github/utils.py
index ec3d5ff..0fb650b 100644
--- a/ForgeImporters/forgeimporters/github/utils.py
+++ b/ForgeImporters/forgeimporters/github/utils.py
@@ -26,6 +26,8 @@ class GitHubMarkdownConverter(object):
         self.code_patterns = ['```', '~~~']
 
     def convert(self, text):
+        if text is None:
+            return ''
         lines = self._parse_lines(text.split('\n'))
         return '\n'.join(lines)