From 9775f132c2da913f1fc61de64edd30b9ab70a7d4 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 20 Jul 2009 16:50:49 +0000 Subject: [PATCH] Don't protect by __name__=='__main__' so we can import this from makepanda directly --- direct/src/plugin/make_contents.py | 11 +++++------ direct/src/plugin/make_package.py | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/direct/src/plugin/make_contents.py b/direct/src/plugin/make_contents.py index 5ca4673d92..05187c0e56 100755 --- a/direct/src/plugin/make_contents.py +++ b/direct/src/plugin/make_contents.py @@ -117,9 +117,8 @@ def makeContents(args): cm.build() -if __name__ == '__main__': - try: - makeContents(sys.argv[1:]) - except ArgumentError, e: - print e.args[0] - sys.exit(1) +try: + makeContents(sys.argv[1:]) +except ArgumentError, e: + print e.args[0] + sys.exit(1) diff --git a/direct/src/plugin/make_package.py b/direct/src/plugin/make_package.py index 693e5da29e..f4ea98b00e 100755 --- a/direct/src/plugin/make_package.py +++ b/direct/src/plugin/make_package.py @@ -222,9 +222,8 @@ def makePackage(args): pm.build() -if __name__ == '__main__': - try: - makePackage(sys.argv[1:]) - except ArgumentError, e: - print e.args[0] - sys.exit(1) +try: + makePackage(sys.argv[1:]) +except ArgumentError, e: + print e.args[0] + sys.exit(1)