Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 26fdbc0

Browse files
authored
Update hoi4statemapgenerator.py
1 parent 3953574 commit 26fdbc0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎python3/hoi4statemapgenerator.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,11 @@ def get_colors(name):
177177
except:
178178
pass
179179
print("Saving file " + name + "...")
180-
with open(name, "rb") as handle:
181-
pickle.dump(colors, handle, protocol=pickle.HIGHEST_PROTOCOL)
180+
try:
181+
with open(name, "rb") as handle:
182+
pickle.dump(colors, handle, protocol=pickle.HIGHEST_PROTOCOL)
183+
except:
184+
print("Could not save file " + name + "! Continuing...")
182185

183186
colors.insert(0, [(1/255)*BLUE_RBG[0], (1/255)*BLUE_RBG[1], (1/255)*BLUE_RBG[2]])
184187
return colors
@@ -237,4 +240,4 @@ def get_colors(name):
237240

238241
province_map.show()
239242
print("Saving file " + args.output + "...")
240-
province_map.save(args.output, "PNG")
243+
province_map.save(args.output, "PNG")

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /