summaryrefslogtreecommitdiffstats
path: root/parsers/caves.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip@Muscogee.localdomain>2020-05-24 01:57:06 +0100
committerWookey <wookey@wookware.org>2020-05-24 20:56:27 +0100
commit50d753a87b5f6bc4fe31e222a37796cf903133f7 (patch)
tree885b01fa921893684b602c20392c1ef995e13482 /parsers/caves.py
parent35f85c55f14e707e37d822041e25bca2913f48c4 (diff)
downloadtroggle-50d753a87b5f6bc4fe31e222a37796cf903133f7.tar.gz
troggle-50d753a87b5f6bc4fe31e222a37796cf903133f7.tar.bz2
troggle-50d753a87b5f6bc4fe31e222a37796cf903133f7.zip
Convert codebase for python3 usage
Diffstat (limited to 'parsers/caves.py')
-rw-r--r--parsers/caves.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/parsers/caves.py b/parsers/caves.py
index 4f65675..745b119 100644
--- a/parsers/caves.py
+++ b/parsers/caves.py
@@ -1,9 +1,10 @@
# -*- coding: utf-8 -*-
-import troggle.core.models as models
-from django.conf import settings
import os
import re
+from django.conf import settings
+
+import troggle.core.models as models
def readcaves():
@@ -14,11 +15,11 @@ def readcaves():
area_1626 = models.Area.objects.update_or_create(short_name = "1626", parent = None)
print(" - Reading Entrances")
#print "list of <Slug> <Filename>"
- for filename in os.walk(settings.ENTRANCEDESCRIPTIONS).next()[2]: #Should be a better way of getting a list of files
+ for filename in next(os.walk(settings.ENTRANCEDESCRIPTIONS))[2]: #Should be a better way of getting a list of files
if filename.endswith('.html'):
readentrance(filename)
print (" - Reading Caves")
- for filename in os.walk(settings.CAVEDESCRIPTIONS).next()[2]: #Should be a better way of getting a list of files
+ for filename in next(os.walk(settings.CAVEDESCRIPTIONS))[2]: #Should be a better way of getting a list of files
if filename.endswith('.html'):
readcave(filename)