2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-14 17:07:13 +00:00

Convert codebase for python3 usage

This commit is contained in:
Philip Sargent
2020-05-24 01:57:06 +01:00
committed by Wookey
parent 35f85c55f1
commit 50d753a87b
38 changed files with 288 additions and 261 deletions

View File

@@ -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)