Commit 2807d723 authored by Ivan Tyagov's avatar Ivan Tyagov

Use existing API to check if converting to base format is supported or not...

Use existing API to check if converting to base format is supported or not (rather than relying on dynamic method introspection).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35390 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 93cc175f
No related merge requests found
......@@ -54,14 +54,14 @@
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
This is a convenient method to call both convertToBaseFormat and\n
discoverMetadata in good order in the same transaction. This method\n
guarantees order of calling methods. convertToBaseFormat is called first,\n
and discoverMetadata is called after.\n
This is a convenient method to call both convertToBaseFormat and\n
discoverMetadata in good order in the same transaction. \n
This method guarantees order of calling methods.\n
"""\n
convertToBaseFormat = getattr(context, \'convertToBaseFormat\', None)\n
if convertToBaseFormat is not None:\n
convertToBaseFormat()\n
\n
if context.isSupportBaseDataConversion():\n
context.convertToBaseFormat()\n
\n
return context.discoverMetadata(file_name, user_login)\n
</string> </value>
</item>
......@@ -101,11 +101,8 @@ return context.discoverMetadata(file_name, user_login)\n
<tuple>
<string>file_name</string>
<string>user_login</string>
<string>getattr</string>
<string>context</string>
<string>None</string>
<string>convertToBaseFormat</string>
<string>_getattr_</string>
<string>context</string>
</tuple>
</value>
</item>
......
93
\ No newline at end of file
94
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment