changeset 3369:73b64e4085ff

macro.EmbedObject: adjusted required_arg removed duplicate msg
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Thu, 20 Mar 2008 21:36:57 +0100
parents 000c9fb7efe0
children fee75398b525
files MoinMoin/macro/EmbedObject.py
diffstat 1 files changed, 1 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/macro/EmbedObject.py	Thu Mar 20 21:36:03 2008 +0100
+++ b/MoinMoin/macro/EmbedObject.py	Thu Mar 20 21:36:57 2008 +0100
@@ -46,7 +46,7 @@
     else:
         return ""
 
-def macro_EmbedObject(macro, target=None, pagename=None,
+def macro_EmbedObject(macro, target=wikiutil.required_arg(unicode), pagename=None,
                       width=wikiutil.UnitArgument(None, float, ['px', 'em', 'mm', '%']),
                       height=wikiutil.UnitArgument(None, float, ['px', 'em', 'mm', '%']),
                       alt=u'',
@@ -75,13 +75,6 @@
     if not pagename:
         pagename = fmt.page.page_name
 
-    if not target:
-        return fmt.text(_('%(extension_name)s %(extension_type)s: Required argument %(argument_name)s missing.') % {
-            "extension_name": extension_name,
-            "extension_type": extension_type,
-            "argument_name": "target",
-        })
-
     if not wikiutil.is_URL(target):
         pagename, fname = AttachFile.absoluteName(target, pagename)