From 7e2e90cfa58957dcf1cf41ad96d82310f1935dff Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Mon, 27 Aug 2012 11:29:13 -0400 Subject: [PATCH] move comment into function re: #549 --- common/lib/xmodule/xmodule/modulestore/xml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/modulestore/xml.py b/common/lib/xmodule/xmodule/modulestore/xml.py index 98260f5982..92eca8f5e6 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml.py +++ b/common/lib/xmodule/xmodule/modulestore/xml.py @@ -82,11 +82,11 @@ class ImportSystem(XMLParsingSystem, MakoDescriptorSystem): def fallback_name(): """Return the fallback name for this module. This is a function instead of a variable because we want it to be lazy.""" + # use the hash of the content--the first 12 bytes should be plenty. return tag + "_" + hashlib.sha1(xml).hexdigest()[:12] # Fallback if there was nothing we could use: if url_name is None or url_name == "": - # use the hash of the content--the first 12 bytes should be plenty. url_name = fallback_name() # Don't log a warning--we don't need this in the log. Do # put it in the error tracker--content folks need to see it.