# HG changeset patch # User Jeff Hammel # Date 1294803013 28800 # Node ID 1295df1700a42e2115322611cec6cd1ec94aacc0 # Parent 67b50417b8d1f119843204ee4926a8389503e387 move stubbing around...maybe last minute will work better? ::shrug:: diff -r 67b50417b8d1 -r 1295df1700a4 makeitso/makeitso.py --- a/makeitso/makeitso.py Tue Jan 11 19:23:53 2011 -0800 +++ b/makeitso/makeitso.py Tue Jan 11 19:30:13 2011 -0800 @@ -17,15 +17,6 @@ from ConfigParser import RawConfigParser from optparse import OptionParser -# get templates from pkg_resources -# (MakeItSo! and [TODO] pastescript templates) -makeitso_templates = {} -try: - from pkg_resources import iter_entry_points - for i in iter_entry_points('makeitso.templates'): - pass # :( -except ImportError: - pass # URL of -this file- location = 'http://k0s.org/mozilla/hg/MakeItSo/raw-file/tip/makeitso/makeitso.py' @@ -516,3 +507,16 @@ if __name__ == '__main__': main() + + +# get templates from pkg_resources +# (MakeItSo! and [TODO] pastescript templates) +# this should go last to ensure the module is wholly loaded +def get_entry_points(name): + try: + from pkg_resources import iter_entry_points + for i in iter_entry_points('makeitso.templates'): + pass # :( + + except ImportError: + return None