From 43dd6fb3bcd78093b6461bcb1b9f4392f2f7e48f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9verin=20Lemaignan?= Date: Mon, 3 Jun 2013 10:37:48 +0200 Subject: [PATCH] [pyassimp] Check cmd line args in sample.py --- port/PyAssimp/scripts/sample.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/port/PyAssimp/scripts/sample.py b/port/PyAssimp/scripts/sample.py index e93e1d7b0..b7b08748f 100755 --- a/port/PyAssimp/scripts/sample.py +++ b/port/PyAssimp/scripts/sample.py @@ -77,5 +77,12 @@ def main(filename=None): # Finally release the model pyassimp.release(scene) +def usage(): + print("Usage: sample.py <3d model>") + if __name__ == "__main__": - main(sys.argv[1] if len(sys.argv)>1 else None) + + if len(sys.argv) != 2: + usage() + else: + main(sys.argv[1])