Browse Source

Don't protect by __name__=='__main__' so we can import this from makepanda directly

rdb 16 years ago
parent
commit
9775f132c2
2 changed files with 10 additions and 12 deletions
  1. 5 6
      direct/src/plugin/make_contents.py
  2. 5 6
      direct/src/plugin/make_package.py

+ 5 - 6
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)

+ 5 - 6
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)