File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 66import os
77# from image_processing import ImageProcessing
88from PIL import Image
9+
10+
911class ResponseError (Exception ):
1012 """レスポンスエラー用の例外."""
13+
1114 def __init__ (self , message : str ):
1215 """コンストラクタ.
1316 Args:
1417 message (string): エラーメッセージ
1518 """
1619 super ().__init__ (message )
20+
21+
1722class OfficialInterface :
1823 """競技システムとの通信を行うクラス."""
1924 SERVER_IP = "192.168.11.44" # 競技システムのIPアドレス
2025 TEAM_ID = 117 # チームID
26+
2127 @classmethod
2228 def upload_snap (cls , img_path : str ) -> bool :
2329 """フィグ画像をアップロードする.
@@ -57,8 +63,10 @@ def upload_snap(cls, img_path: str) -> bool:
5763 print (e )
5864 success = False
5965 return success
66+
67+
6068if __name__ == "__main__" :
6169 print ("test-start" )
6270 print ("Current working directory:" , os .getcwd ())
6371 OfficialInterface .upload_snap ("tests/testdata/img/Fig/Fig1-1.JPEG" )
64- print ("test-end" )
72+ print ("test-end" )
You can’t perform that action at this time.
0 commit comments