[76747] trunk/dports/python

eborisch at macports.org eborisch at macports.org
Mon Mar 7 07:44:40 PST 2011


Revision: 76747
          http://trac.macports.org/changeset/76747
Author:   eborisch at macports.org
Date:     2011-03-07 07:44:38 -0800 (Mon, 07 Mar 2011)
Log Message:
-----------
py2[567]-pydicom: Apply upstream patch to "Catch exception on reading undefined length private data element."

Modified Paths:
--------------
    trunk/dports/python/py25-pydicom/Portfile
    trunk/dports/python/py26-pydicom/Portfile
    trunk/dports/python/py27-pydicom/Portfile

Added Paths:
-----------
    trunk/dports/python/py25-pydicom/files/patch-dicom-filereader.py.diff
    trunk/dports/python/py26-pydicom/files/patch-dicom-filereader.py.diff
    trunk/dports/python/py27-pydicom/files/patch-dicom-filereader.py.diff

Modified: trunk/dports/python/py25-pydicom/Portfile
===================================================================
--- trunk/dports/python/py25-pydicom/Portfile	2011-03-07 10:42:22 UTC (rev 76746)
+++ trunk/dports/python/py25-pydicom/Portfile	2011-03-07 15:44:38 UTC (rev 76747)
@@ -6,7 +6,7 @@
 
 name                py25-pydicom
 version             0.9.5
-revision            1
+revision            2
 platforms           darwin
 categories          python
 license             MIT BSD
@@ -35,4 +35,9 @@
                     patch-dicom-test-_write_stds.py.diff \
                     patch-dicom-test-test_UID.py.diff
 
+# Patches from upstream revision 861d859b4f:
+# See http://code.google.com/p/pydicom/issues/detail?id=97
+patchfiles-append   patch-dicom-filereader.py.diff
+
 depends_lib-append  port:py25-numpy
+

Added: trunk/dports/python/py25-pydicom/files/patch-dicom-filereader.py.diff
===================================================================
--- trunk/dports/python/py25-pydicom/files/patch-dicom-filereader.py.diff	                        (rev 0)
+++ trunk/dports/python/py25-pydicom/files/patch-dicom-filereader.py.diff	2011-03-07 15:44:38 UTC (rev 76747)
@@ -0,0 +1,18 @@
+--- dicom/filereader.py.orig	2011-03-07 09:26:31.000000000 -0600
++++ dicom/filereader.py	2011-03-07 09:27:57.000000000 -0600
+@@ -239,8 +239,14 @@
+         #      undefined length SQs and items of undefined lengths can be nested
+         #      and it would be error-prone to read to the correct outer delimiter 
+         else:
++            # Try to look up type to see if is a SQ
++            # if private tag, won't be able to look it up in dictionary,
++            #   in which case just ignore it and read the bytes
+             if VR is None:
+-                VR = dictionaryVR(tag)
++                try:
++                    VR = dictionaryVR(tag)
++                except KeyError: 
++                    pass
+             if VR == 'SQ':
+                 if debugging:
+                     logger_debug("%04x: Reading and parsing undefined length sequence"

Modified: trunk/dports/python/py26-pydicom/Portfile
===================================================================
--- trunk/dports/python/py26-pydicom/Portfile	2011-03-07 10:42:22 UTC (rev 76746)
+++ trunk/dports/python/py26-pydicom/Portfile	2011-03-07 15:44:38 UTC (rev 76747)
@@ -6,7 +6,7 @@
 
 name                py26-pydicom
 version             0.9.5
-revision            1
+revision            2
 platforms           darwin
 categories          python
 license             MIT BSD
@@ -35,4 +35,9 @@
                     patch-dicom-test-_write_stds.py.diff \
                     patch-dicom-test-test_UID.py.diff
 
+# Patches from upstream revision 861d859b4f:
+# See http://code.google.com/p/pydicom/issues/detail?id=97
+patchfiles-append   patch-dicom-filereader.py.diff
+
 depends_lib-append  port:py26-numpy
+

Added: trunk/dports/python/py26-pydicom/files/patch-dicom-filereader.py.diff
===================================================================
--- trunk/dports/python/py26-pydicom/files/patch-dicom-filereader.py.diff	                        (rev 0)
+++ trunk/dports/python/py26-pydicom/files/patch-dicom-filereader.py.diff	2011-03-07 15:44:38 UTC (rev 76747)
@@ -0,0 +1,18 @@
+--- dicom/filereader.py.orig	2011-03-07 09:26:31.000000000 -0600
++++ dicom/filereader.py	2011-03-07 09:27:57.000000000 -0600
+@@ -239,8 +239,14 @@
+         #      undefined length SQs and items of undefined lengths can be nested
+         #      and it would be error-prone to read to the correct outer delimiter 
+         else:
++            # Try to look up type to see if is a SQ
++            # if private tag, won't be able to look it up in dictionary,
++            #   in which case just ignore it and read the bytes
+             if VR is None:
+-                VR = dictionaryVR(tag)
++                try:
++                    VR = dictionaryVR(tag)
++                except KeyError: 
++                    pass
+             if VR == 'SQ':
+                 if debugging:
+                     logger_debug("%04x: Reading and parsing undefined length sequence"

Modified: trunk/dports/python/py27-pydicom/Portfile
===================================================================
--- trunk/dports/python/py27-pydicom/Portfile	2011-03-07 10:42:22 UTC (rev 76746)
+++ trunk/dports/python/py27-pydicom/Portfile	2011-03-07 15:44:38 UTC (rev 76747)
@@ -6,7 +6,7 @@
 
 name                py27-pydicom
 version             0.9.5
-revision            1
+revision            2
 platforms           darwin
 categories          python
 license             MIT BSD
@@ -35,4 +35,9 @@
                     patch-dicom-test-_write_stds.py.diff \
                     patch-dicom-test-test_UID.py.diff
 
+# Patches from upstream revision 861d859b4f:
+# See http://code.google.com/p/pydicom/issues/detail?id=97
+patchfiles-append   patch-dicom-filereader.py.diff
+
 depends_lib-append  port:py27-numpy
+

Added: trunk/dports/python/py27-pydicom/files/patch-dicom-filereader.py.diff
===================================================================
--- trunk/dports/python/py27-pydicom/files/patch-dicom-filereader.py.diff	                        (rev 0)
+++ trunk/dports/python/py27-pydicom/files/patch-dicom-filereader.py.diff	2011-03-07 15:44:38 UTC (rev 76747)
@@ -0,0 +1,18 @@
+--- dicom/filereader.py.orig	2011-03-07 09:26:31.000000000 -0600
++++ dicom/filereader.py	2011-03-07 09:27:57.000000000 -0600
+@@ -239,8 +239,14 @@
+         #      undefined length SQs and items of undefined lengths can be nested
+         #      and it would be error-prone to read to the correct outer delimiter 
+         else:
++            # Try to look up type to see if is a SQ
++            # if private tag, won't be able to look it up in dictionary,
++            #   in which case just ignore it and read the bytes
+             if VR is None:
+-                VR = dictionaryVR(tag)
++                try:
++                    VR = dictionaryVR(tag)
++                except KeyError: 
++                    pass
+             if VR == 'SQ':
+                 if debugging:
+                     logger_debug("%04x: Reading and parsing undefined length sequence"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110307/35233874/attachment.html>


More information about the macports-changes mailing list