From: W. Trevor King Date: Sat, 26 Jun 2010 20:21:17 +0000 (-0400) Subject: Fixup submod import in sc.py X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c3abbeb54984c2e40d7e204ca8f6f6ef3077fb13;p=sitecorepy.git Fixup submod import in sc.py --- diff --git a/sc.py b/sc.py index 22f45c1..8e2db25 100755 --- a/sc.py +++ b/sc.py @@ -8,7 +8,10 @@ if __name__ == '__main__': command = sys.argv[1] argv = sys.argv[1:] - mod_name = 'sitecore.' + command.replace('-', '.') - print mod_name + submods = command.split('-') + mod_name = 'sitecore.' + '.'.join(submods) module = __import__(mod_name) + for submod in submods: + module = getattr(module, submod) + module.main(argv)