comment out unused code prior to deletion

This commit is contained in:
Philip Sargent 2022-04-07 01:13:54 +03:00
parent c0c4fb72ca
commit 4b1012cbb4

View File

@ -67,17 +67,17 @@ def get_or_create_placeholder(year):
placeholder_logbook_entry, newly_created = save_carefully(LogbookEntry, lookupAttribs, nonLookupAttribs) placeholder_logbook_entry, newly_created = save_carefully(LogbookEntry, lookupAttribs, nonLookupAttribs)
return placeholder_logbook_entry return placeholder_logbook_entry
def listdir(*directories): # def listdir(*directories):
'''WHAT is this ?! Some python2 fossil. The only use of settings.SURVEYS # '''WHAT is this ?! Some python2 fossil. The only use of settings.SURVEYS
local import statement to be avoided, please. # local import statement to be avoided, please.
''' # '''
try: # try:
return os.listdir(os.path.join(settings.SURVEYS, *directories)) # return os.listdir(os.path.join(settings.SURVEYS, *directories))
except: # except:
import urllib.request, urllib.parse, urllib.error # import urllib.request, urllib.parse, urllib.error
url = settings.SURVEYS + reduce(lambda x, y: x + "/" + y, ["listdir"] + list(directories)) # url = settings.SURVEYS + reduce(lambda x, y: x + "/" + y, ["listdir"] + list(directories))
folders = urllib.request.urlopen(url.replace("#", "%23")).readlines() # folders = urllib.request.urlopen(url.replace("#", "%23")).readlines()
return [folder.rstrip(r"/") for folder in folders] # return [folder.rstrip(r"/") for folder in folders]
def LoadListScansFile(wallet): def LoadListScansFile(wallet):
gld = [ ] gld = [ ]