diff MoinMoin/script/migration/_conv160_wiki.py @ 3018:5dfd26496da8

copied mig scripts from 1.6 branch
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 06 Jan 2008 21:56:19 +0100
parents ea9a38d2ec09
children 2a380f99afa8
line wrap: on
line diff
--- a/MoinMoin/script/migration/_conv160_wiki.py	Sun Jan 06 20:09:15 2008 +0100
+++ b/MoinMoin/script/migration/_conv160_wiki.py	Sun Jan 06 21:56:19 2008 +0100
@@ -162,7 +162,13 @@
         macro_args = m.group('macro_args')
         if macro_name == 'ImageLink':
             fixed, kw, trailing = wikiutil.parse_quoted_separated(macro_args)
+            #print "macro_args=%r" % macro_args
+            #print "fixed=%r, kw=%r, trailing=%r" % (fixed, kw, trailing)
             image, target = (fixed + ['', ''])[:2]
+            if image is None:
+                image = ''
+            if target is None:
+                target = ''
             if '://' not in image:
                 # if it is not a URL, it is meant as attachment
                 image = u'attachment:%s' % image