<pre style='margin:0'>
Renee Otten (reneeotten) pushed a commit to branch master
in repository upt-macports.
</pre>
<p><a href="https://github.com/macports/upt-macports/commit/e9e40f0946d2393982f42fbd6c2dfb26b35786ed">https://github.com/macports/upt-macports/commit/e9e40f0946d2393982f42fbd6c2dfb26b35786ed</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new e9e40f0 Update license conversion
</span>e9e40f0 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit e9e40f0946d2393982f42fbd6c2dfb26b35786ed
</span>Author: Korusuke <karan.sheth@somaiya.edu>
AuthorDate: Wed May 29 14:11:36 2019 +0530
<span style='display:block; white-space:pre;color:#404040;'> Update license conversion
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Return unknown if no license found and test for the same
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes #14
</span>---
upt_macports/tests/test_macports_package.py | 2 +-
upt_macports/upt_macports.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/upt_macports/tests/test_macports_package.py b/upt_macports/tests/test_macports_package.py
</span><span style='display:block; white-space:pre;color:#808080;'>index b876f67..2b78a14 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/upt_macports/tests/test_macports_package.py
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/upt_macports/tests/test_macports_package.py
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -10,7 +10,7 @@ class TestMacPortsPackageLicenses(unittest.TestCase):
</span>
def test_no_licenses(self):
self.package.upt_pkg.licenses = []
<span style='display:block; white-space:pre;background:#ffe0e0;'>- expected = ''
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ expected = 'unknown'
</span> self.assertEqual(self.package.licenses, expected)
def test_one_license(self):
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/upt_macports/upt_macports.py b/upt_macports/upt_macports.py
</span><span style='display:block; white-space:pre;color:#808080;'>index a8bf18f..59e1fe4 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/upt_macports/upt_macports.py
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/upt_macports/upt_macports.py
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -32,7 +32,7 @@ class MacPortsPackage(object):
</span> spdx2macports = json.loads(f.read())
return ' '.join([spdx2macports.get(license.spdx_identifier, 'unknown')
<span style='display:block; white-space:pre;background:#ffe0e0;'>- for license in self.upt_pkg.licenses])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for license in self.upt_pkg.licenses]) or 'unknown'
</span>
def _depends(self, phase):
return self.upt_pkg.requirements.get(phase, [])
</pre><pre style='margin:0'>
</pre>