File tree 1 file changed +9
-8
lines changed
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -91,14 +91,15 @@ def get_translation_mods_translation():
91
91
data = {}
92
92
for key , value in translation_mods .items ():
93
93
tmp = {}
94
- for item in value [1 ]["translations" ]:
95
- base_url = value [0 ].rsplit ('/' , 1 )[0 ] + "/content/"
96
- try :
97
- tmp_str = urllib .request .urlopen (base_url + item ).read ()
98
- except :
99
- tmp_str = urllib .request .urlopen ((base_url + item ).replace ("content" , "Content" ).replace ("config" , "Config" )).read ()
100
- tmp |= load_vcmi_json (tmp_str )
101
- data [key ] = tmp
94
+ if "translations" in value [1 ]:
95
+ for item in value [1 ]["translations" ]:
96
+ base_url = value [0 ].rsplit ('/' , 1 )[0 ] + "/content/"
97
+ try :
98
+ tmp_str = urllib .request .urlopen (base_url + item ).read ()
99
+ except :
100
+ tmp_str = urllib .request .urlopen ((base_url + item ).replace ("content" , "Content" ).replace ("config" , "Config" )).read ()
101
+ tmp |= load_vcmi_json (tmp_str )
102
+ data [key ] = tmp
102
103
return data
103
104
104
105
def get_translation_mods_translation_assets ():
You can’t perform that action at this time.
0 commit comments