Update main.py
authorJay Cho <chojoong@gmail.com>
Tue, 18 Sep 2018 06:22:23 +0000 (15:22 +0900)
committerGitHub <noreply@github.com>
Tue, 18 Sep 2018 06:22:23 +0000 (15:22 +0900)
tools/scripts/CodeChecker/main.py

index 29352c6..ff91b3b 100644 (file)
@@ -5,12 +5,12 @@ from PRManager import PRManager
 logPath = "./build.log"
 
 if __name__ == "__main__":
-    if len(sys.argv) == 1:
-        print("Execute with a PR number")
-        print(" ~$ python main.py [PR Number]")
+    if len(sys.argv) < 3:
+        print("Execute with token and the PR number")
+        print(" ~$ python main.py [Token] [PR Number]")
         exit(1)
     logs = BuildLog(logPath)
-    pr = PRManager(int(sys.argv[1]))
+    pr = PRManager(sys.argv[1], int(sys.argv[2]))
     warningsInFile = []
     for file in pr.changedFiles:
         warningsInFile = [warning for warning in logs.warnings if file.filename.endswith(warning[logs.FILE])]