Created
September 27, 2010 12:13
-
-
Save jbergstroem/598927 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/world.py b/world.py | |
index 131cfce..99728c1 100644 | |
--- a/world.py | |
+++ b/world.py | |
@@ -299,6 +299,11 @@ def get_worlds(): | |
"Returns {world # : level.dat information}" | |
ret = {} | |
save_dir = get_save_dir() | |
+ | |
+ # No dirs found - most likely not running from inside minecraft-dir | |
+ if save_dir is None: | |
+ return None | |
+ | |
for dir in os.listdir(save_dir): | |
if dir.startswith("World") and len(dir) == 6: | |
world_n = int(dir[-1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment